Commit 8fe261d8b4c26c0cb9f863ec3850c4b82755a42f
1 parent
a60eb552
QUtil::strcasecmp
Showing
2 changed files
with
13 additions
and
0 deletions
include/qpdf/QUtil.hh
| ... | ... | @@ -166,6 +166,9 @@ namespace QUtil |
| 166 | 166 | QPDF_DLL |
| 167 | 167 | std::list<std::string> read_lines_from_file(std::istream&); |
| 168 | 168 | |
| 169 | + QPDF_DLL | |
| 170 | + int strcasecmp(char const *, char const *); | |
| 171 | + | |
| 169 | 172 | // These routines help the tokenizer recognize certain character |
| 170 | 173 | // classes without using ctype, which we avoid because of locale |
| 171 | 174 | // considerations. | ... | ... |
libqpdf/QUtil.cc
| ... | ... | @@ -619,3 +619,13 @@ QUtil::read_lines_from_file(std::istream& in) |
| 619 | 619 | |
| 620 | 620 | return result; |
| 621 | 621 | } |
| 622 | + | |
| 623 | +int | |
| 624 | +QUtil::strcasecmp(char const *s1, char const *s2) | |
| 625 | +{ | |
| 626 | +#ifdef _WIN32 | |
| 627 | + return _stricmp(s1, s2); | |
| 628 | +#else | |
| 629 | + return ::strcasecmp(s1, s2); | |
| 630 | +#endif | |
| 631 | +} | ... | ... |