(file) Return to jsoc_version.h CVS log (file) (dir) Up to [Development] / JSOC / base

 1 arta  1.1 /*
 2            *  jsoc_version.h
 3            *
 4            * Contains the master version, release and build number definition.
 5            *
 6            *  Responsible:  CM
 7            *
 8            * NOTE: !!!!!!!! This should only be modified by the CM !!!!!!!!!!!!
 9            *
10            */
11           
12           #ifndef JSOC_VERSION_INCL
13           
14           #define JSOC_VERSION_INCL 1
15           
16 arta  1.177 #define jsoc_version "V9R41X"
17             #define jsoc_vers_num (-941)
18 arta  1.1   
19 arta  1.21  
20             static inline const char *jsoc_getversion(char *verstr, int size, int *isdev)
21             {
22 arta  1.64      char *vers = strdup(jsoc_version);
23                 char *pc = NULL;
24                 int len = strlen(jsoc_version);
25 arta  1.130 
26 arta  1.64      if (vers)
27                 {
28                     if (isdev)
29                     {
30                         *isdev = 0;
31                     }
32 arta  1.130 
33 arta  1.64          if ((pc = strchr(vers, 'R')) != NULL)
34                     {
35                         *pc = '\0';
36                     }
37 arta  1.130 
38 arta  1.64          if (jsoc_version[len - 1] == 'X')
39                     {
40                         if (isdev)
41                         {
42                             *isdev = 1;
43                         }
44 arta  1.130 
45 arta  1.64              vers[len - 1] = '\0';
46                     }
47 arta  1.130 
48 arta  1.64          snprintf(verstr, size, "%s.%s", vers + 1, pc + 1);
49 arta  1.130 
50 arta  1.64          free(vers);
51                 }
52                 else
53                 {
54                     fprintf(stderr, "Out of memory.\n");
55 arta  1.130     }
56             
57 arta  1.64      return jsoc_version;
58 arta  1.21  }
59             
60 arta  1.1   #endif

Karen Tian
Powered by
ViewCVS 0.9.4