00001
00002
00003 #define NO_DBG_MEM
00004
00005 #include "rcsvers.hh"
00006
00007 #ifdef __cplusplus
00008 extern "C" {
00009 #endif
00010
00011 void cms_print_servers(void);
00012 void cms_print_servers(void);
00013 int nml_print_diag_list(void);
00014 void print_etime(void);
00015 int rcs_print(char *_fmt, ...);
00016
00017 #ifdef __cplusplus
00018 }
00019 #endif
00020
00021
00022 #include <string.h>
00023 #include <stdlib.h>
00024
00025 int rcs_version_printed = 0;
00026
00027 const int rcs_major_version_number = RCS_MAJOR_VERSION;
00028 const int rcs_minor_version_number = RCS_MINOR_VERSION;
00029
00030 #if !defined(PLATNAME) && defined(WIN32)
00031 #define PLATNAME "win32m__sc"
00032 #endif
00033
00034 #ifdef darwin
00035 #define darwin_static static
00036 #else
00037 #define darwin_static
00038 #endif
00039
00040 #ifdef __VERSION__
00041 darwin_static const char *rcs_version_info_string = "@(#)" "$Info: RCS_LIBRARY_VERSION " RCS_VERSION " Compiled on " __DATE__ " at " __TIME__ " for the " PLATNAME " platform with compiler version " __VERSION__ " $ .\n";
00042 #else
00043 darwin_static const char *rcs_version_info_string = "@(#)" " $Info: RCS_LIBRARY_VERSION " RCS_VERSION " Compiled on " __DATE__ " at " __TIME__ " for the " PLATNAME " platform. $ \n";
00044 #endif
00045
00046
00047 darwin_static const char *rcs_version_string;
00048
00049 void print_rcs_version()
00050 {
00051 rcs_version_printed = 1;
00052 #ifndef rtlinux
00053 rcs_print((char *) rcs_version_info_string);
00054 #endif
00055 }
00056
00057 #if 0
00058 int rcs_version_compare(const char * compversion)
00059 {
00060 char comp_version_buf[256];
00061 strncpy(comp_version_buf,compversion, 256);
00062 char *period = comp_version_buf;
00063 while(*period != 0 && *period != '.')
00064 {
00065 period++;
00066 }
00067 if(NULL != period)
00068 {
00069 *period = 0;
00070 }
00071 int comp_major = atol(comp_version_buf);
00072 if(comp_major < rcs_major_version_number)
00073 {
00074 return +1;
00075 }
00076 else if (comp_major > rcs_major_version_number)
00077 {
00078 return -1;
00079 }
00080
00081 if(NULL != period)
00082 {
00083 int comp_minor = atol(period + 1);
00084 if(comp_minor < rcs_minor_version_number)
00085 {
00086 return +1;
00087 }
00088 else if (comp_minor > rcs_minor_version_number)
00089 {
00090 return -1;
00091 }
00092 }
00093 return 0;
00094 }
00095
00096 #endif
00097
00098 #if !defined(UNDER_CE) && !defined(rtlinux)
00099
00100 int rcsinfo(void)
00101 {
00102 print_rcs_version();
00103 cms_print_servers();
00104 print_etime();
00105 nml_print_diag_list();
00106 #ifdef VXWORKS
00107 rcs_shm_table_print();
00108 rcs_sem_table_print();
00109 #endif
00110 return(0);
00111 }
00112
00113 #ifdef __cplusplus
00114 extern "C" int rcs_info(void);
00115 #endif
00116
00117 int rcs_info(void)
00118 {
00119 return rcsinfo();
00120 }
00121
00122 #endif
00123
00124
00125
00126