diff options
Diffstat (limited to 'apps/plugins/sdl/progs/wolf3d/wl_def.h')
-rw-r--r-- | apps/plugins/sdl/progs/wolf3d/wl_def.h | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/apps/plugins/sdl/progs/wolf3d/wl_def.h b/apps/plugins/sdl/progs/wolf3d/wl_def.h index 1b8670ffb6..13ec77cf70 100644 --- a/apps/plugins/sdl/progs/wolf3d/wl_def.h +++ b/apps/plugins/sdl/progs/wolf3d/wl_def.h | |||
@@ -1392,23 +1392,17 @@ static fixed FixedMul(fixed a, fixed b) | |||
1392 | 1392 | ||
1393 | #define CHECKMALLOCRESULT(x) if(!(x)) Quit("Out of memory at %s:%i", __FILE__, __LINE__) | 1393 | #define CHECKMALLOCRESULT(x) if(!(x)) Quit("Out of memory at %s:%i", __FILE__, __LINE__) |
1394 | 1394 | ||
1395 | #ifdef _WIN32 | 1395 | static char* itoa(int value, char* string, int radix) |
1396 | #define strcasecmp stricmp | 1396 | { |
1397 | #define strncasecmp strnicmp | 1397 | sprintf(string, "%d", value); |
1398 | #define snprintf _snprintf | 1398 | return string; |
1399 | #else | 1399 | } |
1400 | static char* itoa(int value, char* string, int radix) | ||
1401 | { | ||
1402 | sprintf(string, "%d", value); | ||
1403 | return string; | ||
1404 | } | ||
1405 | 1400 | ||
1406 | static char* ltoa(long value, char* string, int radix) | 1401 | static char* ltoa(long value, char* string, int radix) |
1407 | { | 1402 | { |
1408 | sprintf(string, "%ld", value); | 1403 | sprintf(string, "%ld", value); |
1409 | return string; | 1404 | return string; |
1410 | } | 1405 | } |
1411 | #endif | ||
1412 | 1406 | ||
1413 | #define lengthof(x) (sizeof(x) / sizeof(*(x))) | 1407 | #define lengthof(x) (sizeof(x) / sizeof(*(x))) |
1414 | #define endof(x) ((x) + lengthof(x)) | 1408 | #define endof(x) ((x) + lengthof(x)) |