mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-13 09:52:01 -04:00
trying to debug, additional rewrites
This commit is contained in:
parent
378b5586ab
commit
42f780a729
87 changed files with 1771 additions and 529 deletions
23
platform/istr.c
Normal file
23
platform/istr.c
Normal file
|
@ -0,0 +1,23 @@
|
|||
#include "platform.h"
|
||||
|
||||
#include <ctype.h>
|
||||
int stricmp(const char *a, const char *b) {
|
||||
while (*a && *b) {
|
||||
char ca = toupper(*a);
|
||||
char cb = toupper(*b);
|
||||
if (ca<cb) return -1;
|
||||
if (ca>cb) return 1;
|
||||
++a;
|
||||
++b;
|
||||
}
|
||||
if (*a) return 1;
|
||||
if (*b) return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void strupr(char *c) {
|
||||
while (*c) {
|
||||
*c = toupper(*c);
|
||||
++c;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue