From a31b8b396b5dcd409b58b5b81362536250108eaf Mon Sep 17 00:00:00 2001 From: Ianos Gnatiuc Date: Wed, 12 Oct 2005 05:15:00 +0000 Subject: [PATCH] replace Service_Pack_ with SP in @osver macro under WinNT --- goldlib/gall/gstrall.h | 1 + goldlib/gall/gstrutil.cpp | 2 +- goldlib/gall/gutlvers.cpp | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/goldlib/gall/gstrall.h b/goldlib/gall/gstrall.h index b0a9efa..b62b8e6 100644 --- a/goldlib/gall/gstrall.h +++ b/goldlib/gall/gstrall.h @@ -63,6 +63,7 @@ char* stridela(const char* substr, char* str); int strnicmpw(const char* str1, const char* str2, int len); const char* striinc(const char* str1, const char* str2); 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* strrjust(char* str); char* strschg(char* str, const char* find, const char* replace); diff --git a/goldlib/gall/gstrutil.cpp b/goldlib/gall/gstrutil.cpp index cd973b5..7870fe2 100644 --- a/goldlib/gall/gstrutil.cpp +++ b/goldlib/gall/gstrutil.cpp @@ -176,7 +176,7 @@ char* strins(const char* instr, char* str, int st_pos) { // ------------------------------------------------------------------ // 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; diff --git a/goldlib/gall/gutlvers.cpp b/goldlib/gall/gutlvers.cpp index 0ac8559..201caf1 100644 --- a/goldlib/gall/gutlvers.cpp +++ b/goldlib/gall/gutlvers.cpp @@ -448,6 +448,7 @@ char* ggetosstring(void) { char _tmp[128]; strcpy(_tmp, info.szCSDVersion); strchg(_tmp, ' ', '_'); + strisrep(_tmp, "Service_Pack_", "SP"); sprintf(osstring, "%s %ld.%ld.%ld-%s %s", ostype, info.dwMajorVersion, info.dwMinorVersion, info.dwBuildNumber, _tmp, processor); } else