1 #ifndef _WIN32
2 
3 #ifndef APE_NOWINDOWS_H
4 #define APE_NOWINDOWS_H
5 
6 #include "MACUtils.h"
7 
8 #define FALSE    0
9 #define TRUE    1
10 
11 #define NEAR
12 #define FAR
13 
14 typedef unsigned long        uint64;
15 typedef long                    int64;
16 typedef unsigned int        uint32;
17 typedef int                    int32;
18 typedef unsigned short        uint16;
19 typedef short                int16;
20 typedef unsigned char        uint8;
21 typedef char                int8;
22 typedef char                str_ansi;
23 typedef unsigned char        str_utf8;
24 typedef wchar_t                str_utf16;
25 
26 typedef unsigned long       DWORD;
27 typedef int                 BOOL;
28 typedef unsigned char       BYTE;
29 typedef unsigned short      WORD;
30 typedef float               FLOAT;
31 typedef void *                HANDLE;
32 typedef unsigned int        UINT;
33 typedef unsigned int        WPARAM;
34 typedef long                LPARAM;
35 typedef const char *        LPCSTR;
36 typedef char *                LPSTR;
37 typedef long                LRESULT;
38 typedef unsigned char       UCHAR;
39 typedef const wchar_t *     LPCWSTR;
40 
41 #define ZeroMemory(POINTER, BYTES) memset(POINTER, 0, BYTES);
42 #define max(a,b)    (((a) > (b)) ? (a) : (b))
43 #define min(a,b)    (((a) < (b)) ? (a) : (b))
44 
45 #define __stdcall
46 #define CALLBACK
47 
48 #define _stricmp strcasecmp
49 #define _strnicmp strncasecmp
50 
51 #ifdef HAVE_WCSCASECMP
52 
53 #define wcsnicmp wcsncasecmp
54 #define _wcsicmp wcscasecmp
55 #define wcsicmp wcscasecmp
56 
57 #else
58 
59 #define wcsnicmp mac_wcsncasecmp
60 #define _wcsicmp mac_wcscasecmp
61 #define wcsicmp mac_wcscasecmp
62 
63 #endif // HAVE_WCSCASECMP
64 
65 #define _wtoi(ws) wcstol(ws, NULL, 2)
66 
67 #include <locale.h>
68 
69 #define _FPOSOFF(fp) ((long)(fp).__pos)
70 #define MAX_PATH    4096
71 
72 #ifndef _WAVEFORMATEX_
73 #define _WAVEFORMATEX_
74 
75 typedef struct tWAVEFORMATEX
76 {
77     uint16        wFormatTag;         /* format type */
78     uint16        nChannels;          /* number of channels (i.e. mono, stereo...) */
79     uint32       nSamplesPerSec;     /* sample rate */
80     uint32       nAvgBytesPerSec;    /* for buffer estimation */
81     uint16        nBlockAlign;        /* block size of data */
82     uint16        wBitsPerSample;     /* number of bits per sample of mono data */
83     uint16        cbSize;             /* the count in bytes of the size of */
84                     /* extra information (after cbSize) */
85 } WAVEFORMATEX, *PWAVEFORMATEX, NEAR *NPWAVEFORMATEX, FAR *LPWAVEFORMATEX;
86 typedef const WAVEFORMATEX FAR *LPCWAVEFORMATEX;
87 
88 #endif // #ifndef _WAVEFORMATEX_
89 
90 #endif // #ifndef APE_NOWINDOWS_H
91 
92 #endif // #ifndef _WIN32
93