19 static const char*
cUrl =
"$HeadURL: svn://svn.nublado.org/cloudy/branches/c17_branch/source/version.cpp $";
23 static const char chMonth[12][4] =
24 {
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec" };
46 if( Part.size() >= 3 )
51 string Branch = Part[Part.size()-3];
53 bool lgReleaseTag = ( Url.find(
"/tags/release/") != string::npos );
54 bool lgPatchTag = ( Url.find(
"/tags/patch_versions/") != string::npos );
55 bool lgDevelopTag = ( Url.find(
"/tags/develop/") != string::npos );
58 Branch.size() == 10 && Branch[0] ==
'c' &&
59 Branch.find(
"_branch") != string::npos );
61 lgRelease = ( lgReleaseTag || lgPatchTag );
64 string::size_type ptr;
65 if( lgDevelopTag && ( ptr = Branch.find(
"_rc" ) ) != string::npos )
67 sscanf( Branch.substr( ptr+3 ).c_str(),
"%ld", &
nBetaVer );
75 int nMajorLevel=0, nMinorLevel=0, nPatchLevel=0;
80 sscanf( Branch.substr(1,2).c_str(),
"%d", &nMajorLevel );
82 fprintf(
ioQQQ,
"PROBLEM - CLD_MAJOR mismatch, please check version.cpp\n" );
88 sscanf( Branch.substr(4,2).c_str(),
"%d", &nMinorLevel );
90 fprintf(
ioQQQ,
"PROBLEM - CLD_MINOR mismatch, please check version.cpp\n" );
96 sscanf( Branch.substr(9,2).c_str(),
"%d", &nPatchLevel );
98 fprintf(
ioQQQ,
"PROBLEM - CLD_PATCH mismatch, please check version.cpp\n" );
100 if( nPatchLevel == 0 )
108 strcpy(
chVersion, Branch.substr(1,5).c_str() );
109 else if( lgPatchTag )
111 sprintf(
chVersion,
"%s (patch level %d)", Branch.substr(1,5).c_str(), nPatchLevel );
112 else if( nBetaVer > 0 )
114 sprintf(
chVersion,
"%s beta %ld (prerelease)", Branch.substr(1,5).c_str(),
nBetaVer );
138 sprintf(
chVersion,
"%2.2i.%2.2i (patch level %d)",
145 sprintf(
chVersion,
"%2.2i.%2.2i beta %ld (prerelease)",
157 if(
sizeof(
int) == 4 &&
sizeof(
long) == 4 &&
sizeof(
long*) == 4 )
158 strncpy( mode,
"ILP32",
sizeof(mode) );
159 else if(
sizeof(
int) == 4 &&
sizeof(
long) == 4 &&
sizeof(
long*) == 8 )
160 strncpy( mode,
"IL32P64",
sizeof(mode) );
161 else if(
sizeof(
int) == 4 &&
sizeof(
long) == 8 &&
sizeof(
long*) == 8 )
162 strncpy( mode,
"I32LP64",
sizeof(mode) );
163 else if(
sizeof(
int) == 8 &&
sizeof(
long) == 8 &&
sizeof(
long*) == 8 )
164 strncpy( mode,
"ILP64",
sizeof(mode) );
166 strncpy( mode,
"UNKN",
sizeof(mode) );
174 "Cloudy compiled on %s in OS %s using the %s %i compiler. Mode %s, "
175 "denormalized float: %c double: %c.",
static const int CLD_PATCH
char chVersion[INPUT_LINE_LENGTH]
double min_double() const
static const int CLD_MINOR
char chDate[INPUT_LINE_LENGTH]
static const int CLD_MAJOR
sys_float min_float() const
int fprintf(const Output &stream, const char *format,...)
void Split(const string &str, const string &sep, vector< string > &lst, split_mode mode)
char chInfo[INPUT_LINE_LENGTH]
static const char * svn_revision