version 1.5, 2008/03/05 18:07:27
|
version 1.147, 2021/02/17 05:40:56
|
|
|
| |
#define JSOC_VERSION_INCL 1 | #define JSOC_VERSION_INCL 1 |
| |
#define jsoc_version "V4R1X" |
#define jsoc_version "V9R41X" |
#define jsoc_vers_num (401) |
#define jsoc_vers_num (-941) |
| |
#endif |
|
| |
|
static inline const char *jsoc_getversion(char *verstr, int size, int *isdev) |
|
{ |
|
char *vers = strdup(jsoc_version); |
|
char *pc = NULL; |
|
int len = strlen(jsoc_version); |
|
|
|
if (vers) |
|
{ |
|
if (isdev) |
|
{ |
|
*isdev = 0; |
|
} |
|
|
|
if ((pc = strchr(vers, 'R')) != NULL) |
|
{ |
|
*pc = '\0'; |
|
} |
|
|
|
if (jsoc_version[len - 1] == 'X') |
|
{ |
|
if (isdev) |
|
{ |
|
*isdev = 1; |
|
} |
|
|
|
vers[len - 1] = '\0'; |
|
} |
|
|
|
snprintf(verstr, size, "%s.%s", vers + 1, pc + 1); |
|
|
|
free(vers); |
|
} |
|
else |
|
{ |
|
fprintf(stderr, "Out of memory.\n"); |
|
} |
|
|
|
return jsoc_version; |
|
} |
|
|
|
#endif |