Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 649248
Collapse All | Expand All

(-)codeblocks-16.01.release.orig/src/include/scripting/sqplus/sqplus.h (-2 / +19 lines)
Lines 131-136 Link Here
131
131
132
// === Do not use directly: use one of the predefined sizes below ===
132
// === Do not use directly: use one of the predefined sizes below ===
133
133
134
135
static int strI_Cmp(const char * s0, const char * s1)
136
{
137
  return strcasecmp(s0, s1);
138
}
139
140
#include <wctype.h> 
141
static int strI_Cmp(const wchar_t * w0, const wchar_t * w1)
142
{
143
  while (*w0 != 0) {
144
    if (towupper(*w0) != towupper(*w1)) {
145
      return towupper(*w0) - towupper(*w1);
146
    }
147
  }
148
  return *w0 - *w1; 
149
}
150
134
template<SQInteger MAXLENGTH> // MAXLENGTH is max printable characters (trailing NULL is accounted for in ScriptStringVarBase::s[1]).
151
template<SQInteger MAXLENGTH> // MAXLENGTH is max printable characters (trailing NULL is accounted for in ScriptStringVarBase::s[1]).
135
struct ScriptStringVar : ScriptStringVarBase {
152
struct ScriptStringVar : ScriptStringVarBase {
136
  SQChar ps[MAXLENGTH];
153
  SQChar ps[MAXLENGTH];
Lines 147-156 Link Here
147
    return safeStringCopy(s,_s.s,MaxLength);
164
    return safeStringCopy(s,_s.s,MaxLength);
148
  }
165
  }
149
  bool operator == (const ScriptStringVar & _s) {
166
  bool operator == (const ScriptStringVar & _s) {
150
    return _strcmp(s,_s.s) == 0;
167
    return scstrcmp(s,_s.s) == 0;
151
  }
168
  }
152
  bool compareCaseInsensitive(const ScriptStringVar & _s) {
169
  bool compareCaseInsensitive(const ScriptStringVar & _s) {
153
    return _stricmp(s,_s.s) == 0;
170
    return strI_Cmp(s,_s.s) == 0;
154
  }
171
  }
155
};
172
};
156
173

Return to bug 649248