From 2179b64ed10c0b2023c46eca1ab1b973d452529a Mon Sep 17 00:00:00 2001 From: Stas Degteff Date: Mon, 8 Aug 2005 11:00:43 +0000 Subject: [PATCH] Fix case-insensitive pattern match for Windwos 9x. Thanks to Ianos Gnatiuc 2:469/335.155 --- goldlib/gall/gbmh.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/goldlib/gall/gbmh.cpp b/goldlib/gall/gbmh.cpp index f8000f1..e25f354 100644 --- a/goldlib/gall/gbmh.cpp +++ b/goldlib/gall/gbmh.cpp @@ -64,8 +64,14 @@ void gbmh::init(const char* pattern, bool ignorecase) { // Copy pattern strcpy(pat, pattern); - if(ignore_case) + if(ignore_case) { +#ifndef _MSC_VER strupr(pat); +#else /* strupr() is wrong on windows 9x (patch from Ianos Gnatiuc 2:469/335.155) */ + for(char *ptr = pat; *ptr; ptr++) + *ptr = toupper(*ptr); +#endif + } // initialize skip array int i;