replace Service_Pack_ with SP in @osver macro under WinNT

This commit is contained in:
Ianos Gnatiuc 2005-10-12 05:15:00 +00:00
parent 73b0d1b7d3
commit a31b8b396b
3 changed files with 3 additions and 1 deletions

View File

@ -63,6 +63,7 @@ char* stridela(const char* substr, char* str);
int strnicmpw(const char* str1, const char* str2, int len); int strnicmpw(const char* str1, const char* str2, int len);
const char* striinc(const char* str1, const char* str2); const char* striinc(const char* str1, const char* str2);
char* strins(const char* instr, char* str, int st_pos); char* strins(const char* instr, char* str, int st_pos);
char* strisrep(char* str, const char* search, const char* replace);
char* strischg(char* str, const char* find, const char* replace); char* strischg(char* str, const char* find, const char* replace);
char* strrjust(char* str); char* strrjust(char* str);
char* strschg(char* str, const char* find, const char* replace); char* strschg(char* str, const char* find, const char* replace);

View File

@ -176,7 +176,7 @@ char* strins(const char* instr, char* str, int st_pos) {
// ------------------------------------------------------------------ // ------------------------------------------------------------------
// String search and replace, case insensitive // String search and replace, case insensitive
static char* strisrep(char* str, const char* search, const char* replace) { char* strisrep(char* str, const char* search, const char* replace) {
char* p; char* p;

View File

@ -448,6 +448,7 @@ char* ggetosstring(void) {
char _tmp[128]; char _tmp[128];
strcpy(_tmp, info.szCSDVersion); strcpy(_tmp, info.szCSDVersion);
strchg(_tmp, ' ', '_'); strchg(_tmp, ' ', '_');
strisrep(_tmp, "Service_Pack_", "SP");
sprintf(osstring, "%s %ld.%ld.%ld-%s %s", ostype, info.dwMajorVersion, info.dwMinorVersion, info.dwBuildNumber, _tmp, processor); sprintf(osstring, "%s %ld.%ld.%ld-%s %s", ostype, info.dwMajorVersion, info.dwMinorVersion, info.dwBuildNumber, _tmp, processor);
} }
else else