| 1 | /* |
| 2 | * This source code is public domain. |
| 3 | * |
| 4 | * Authors: Rani Assaf <[email protected]>, |
| 5 | * Olivier Lapicque <[email protected]>, |
| 6 | * Adam Goode <[email protected]> (endian and char fixes for PPC) |
| 7 | */ |
| 8 | |
| 9 | #ifndef MP_STDAFX_H |
| 10 | #define MP_STDAFX_Hcxx . . $ `ext/psmplug/stdafx.h:10:9`! |
| 11 | |
| 12 | #ifdef _WIN32 |
| 13 | |
| 14 | #ifdef MSC_VER |
| 15 | #pragma warning (disable:4201) |
| 16 | #pragma warning (disable:4514) |
| 17 | #endif |
| 18 | |
| 19 | #define WIN32_LEAN_AND_MEAN |
| 20 | #include <windows.h> |
| 21 | #include <windowsx.h> |
| 22 | #include <mmsystem.h> |
| 23 | #include <stdio.h> |
| 24 | #include <stdlib.h> |
| 25 | #include <stdint.h> |
| 26 | |
| 27 | #define srandom(_seed) srand(_seed) |
| 28 | #define random() rand() |
| 29 | #define sleep(_ms) Sleep(_ms) |
| 30 | |
| 31 | #undef strcasecmp |
| 32 | #undef strncasecmp |
| 33 | #define strcasecmp(a,b) _stricmp(a,b) |
| 34 | #define strncasecmp(a,b,c) _strnicmp(a,b,c) |
| 35 | |
| 36 | #ifndef isblank |
| 37 | #define isblank(c) ((c) == ' ' || (c) == '\t') |
| 38 | #endif |
| 39 | |
| 40 | #else |
| 41 | |
| 42 | #include <inttypes.h> |
| 43 | #include <stdint.h> |
| 44 | #include <stdlib.h> |
| 45 | #include <stdio.h> |
| 46 | #include <string.h> |
| 47 | |
| 48 | typedef int8_tcxx . . $ int8_t# CHARcxx . . $ CHAR#; |
| 49 | typedef uint8_tcxx . . $ uint8_t# UCHARcxx . . $ UCHAR#; |
| 50 | typedef uint8_tcxx . . $ uint8_t#* PUCHARcxx . . $ PUCHAR#; |
| 51 | typedef uint16_tcxx . . $ uint16_t# USHORTcxx . . $ USHORT#; |
| 52 | typedef uint32_tcxx . . $ uint32_t# ULONGcxx . . $ ULONG#; |
| 53 | typedef uint32_tcxx . . $ uint32_t# UINTcxx . . $ UINT#; |
| 54 | typedef uint32_tcxx . . $ uint32_t# DWORDcxx . . $ DWORD#; |
| 55 | typedef int32_tcxx . . $ int32_t# LONGcxx . . $ LONG#; |
| 56 | typedef int64_tcxx . . $ int64_t# LONGLONGcxx . . $ LONGLONG#; |
| 57 | typedef int32_tcxx . . $ int32_t#* LPLONGcxx . . $ LPLONG#; |
| 58 | typedef uint32_tcxx . . $ uint32_t#* LPDWORDcxx . . $ LPDWORD#; |
| 59 | typedef uint16_tcxx . . $ uint16_t# WORDcxx . . $ WORD#; |
| 60 | typedef uint8_tcxx . . $ uint8_t# BYTEcxx . . $ BYTE#; |
| 61 | typedef uint8_tcxx . . $ uint8_t#* LPBYTEcxx . . $ LPBYTE#; |
| 62 | typedef bool BOOLcxx . . $ BOOL#; |
| 63 | typedef char* LPSTRcxx . . $ LPSTR#; |
| 64 | typedef void* LPVOIDcxx . . $ LPVOID#; |
| 65 | typedef uint16_tcxx . . $ uint16_t#* LPWORDcxx . . $ LPWORD#; |
| 66 | typedef const char* LPCSTRcxx . . $ LPCSTR#; |
| 67 | typedef void* PVOIDcxx . . $ PVOID#; |
| 68 | typedef void VOIDcxx . . $ VOID#; |
| 69 | |
| 70 | inline LONGcxx . . $ LONG# MulDivcxx . . $ MulDiv(cfe964a60c8b92f5). (long a, long b, long c) |
| 71 | { |
| 72 | /*if (!c) return 0;*/ |
| 73 | return ((uint64_tcxx . . $ uint64_t#) a * (uint64_tcxx . . $ uint64_t#) b ) / c; |
| 74 | } |
| 75 | |
| 76 | #define lstrcpynAcxx . . $ `ext/psmplug/stdafx.h:76:9`! strncpy |
| 77 | #define lstrcpyAcxx . . $ `ext/psmplug/stdafx.h:77:9`! strcpy |
| 78 | #define wsprintfAcxx . . $ `ext/psmplug/stdafx.h:78:9`! sprintf |
| 79 | |
| 80 | #define WAVE_FORMAT_PCMcxx . . $ `ext/psmplug/stdafx.h:80:9`! 1 |
| 81 | |
| 82 | #define GHNDcxx . . $ `ext/psmplug/stdafx.h:82:10`! 0 |
| 83 | #define GlobalFreePtrcxx . . $ `ext/psmplug/stdafx.h:83:9`!(p) free((void *)(p)) |
| 84 | inline int8_tcxx . . $ int8_t# * GlobalAllocPtrcxx . . $ GlobalAllocPtr(337445495618d213).(unsigned int, size_t size) |
| 85 | { |
| 86 | int8_tcxx . . $ int8_t# * p = (int8_tcxx . . $ int8_t# *) malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(size); |
| 87 | |
| 88 | if (p != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!) memset(p, 0, size); |
| 89 | return p; |
| 90 | } |
| 91 | |
| 92 | #ifndef FALSE |
| 93 | #define FALSEcxx . . $ `ext/psmplug/stdafx.h:93:9`! false |
| 94 | #endif |
| 95 | |
| 96 | #ifndef TRUE |
| 97 | #define TRUEcxx . . $ `ext/psmplug/stdafx.h:97:9`! true |
| 98 | #endif |
| 99 | |
| 100 | #endif /* _WIN32 */ |
| 101 | |
| 102 | #endif |