LibRan  0.1
Pseudo-random number distribution generator
LRversion.c
Go to the documentation of this file.
1 
18 /*
19  * Copyright 2019 R.K. Owen, Ph.D.
20  * License see lgpl.md (Gnu Lesser General Public License)
21  */
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 #include <string.h>
27 #include "libran.h"
28 
39 #define STRINGIFY(arg) #arg
40 #define STRVAL(arg) STRINGIFY(arg)
41 
42 char *LRversion(char *str) {
43  if (!strncasecmp("version",str,4)) {
44  return STRVAL(LR_VERSION);
45  } else if (!strncasecmp("major",str,5)) {
46  return STRVAL(LR_VER_MAJOR);
47  } else if (!strncasecmp("minor",str,5)) {
48  return STRVAL(LR_VER_MINOR);
49  } else if (!strncasecmp("patch",str,5)) {
50  return STRVAL(LR_VER_PATCH);
51  } else if (!strncasecmp("date",str,4)) {
52  return STRVAL(LR_DATE);
53  } else {
54  return "";
55  }
56 }
57 
58 #ifdef __cplusplus
59 }
60 #endif
61 
#define LR_VERSION
LibRan Library Version (X.Y.Z)
Definition: libran.h:23
#define LR_DATE
LibRan Library date (YYYYMMDD)
Definition: libran.h:27
The LibRan common header file.