xref: /haiku/src/add-ons/media/plugins/ape_reader/MAClib/NoWindows.h (revision 2b76973fa2401f7a5edf68e6470f3d3210cbcff3)
1 #ifndef _WIN32
2 
3 #ifndef APE_NOWINDOWS_H
4 #define APE_NOWINDOWS_H
5 
6 #include <SupportDefs.h>
7 
8 #define	wchar_t	char
9 
10 #define FALSE    0
11 #define TRUE    1
12 
13 #define NEAR
14 #define FAR
15 
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 const wchar_t *     LPCTSTR;	// ?? SHINTA
37 typedef const wchar_t *     LPCWSTR;	// ?? SHINTA
38 typedef char *                LPSTR;
39 typedef long                LRESULT;
40 typedef	unsigned char		UCHAR;
41 
42 #define ZeroMemory(POINTER, BYTES) memset(POINTER, 0, BYTES);
43 #define max(a,b)    (((a) > (b)) ? (a) : (b))
44 #define min(a,b)    (((a) < (b)) ? (a) : (b))
45 
46 //#define __stdcall
47 #define CALLBACK
48 
49 #define _stricmp strcasecmp
50 #define _strnicmp strncasecmp
51 
52 #define	wcslen	strlen
53 #define	wcsicmp	strcmp
54 #define	_wtoi	atoi
55 #define	_wcsicmp	strcmp
56 #define	wcscmp	strcmp
57 
58 #define _FPOSOFF(fp) ((long)(fp).__pos)
59 #define MAX_PATH    260
60 
61 #ifndef _WAVEFORMATEX_
62 #define _WAVEFORMATEX_
63 
64 typedef struct tWAVEFORMATEX
65 {
66     WORD        wFormatTag;         /* format type */
67     WORD        nChannels;          /* number of channels (i.e. mono, stereo...) */
68     DWORD       nSamplesPerSec;     /* sample rate */
69     DWORD       nAvgBytesPerSec;    /* for buffer estimation */
70     WORD        nBlockAlign;        /* block size of data */
71     WORD        wBitsPerSample;     /* number of bits per sample of mono data */
72     WORD        cbSize;             /* the count in bytes of the size of */
73                     /* extra information (after cbSize) */
74 } WAVEFORMATEX, *PWAVEFORMATEX, NEAR *NPWAVEFORMATEX, FAR *LPWAVEFORMATEX;
75 typedef const WAVEFORMATEX FAR *LPCWAVEFORMATEX;
76 
77 const int32	ERROR_INVALID_PARAMETER = B_ERRORS_END+1;
78 
79 #endif // #ifndef _WAVEFORMATEX_
80 
81 #endif // #ifndef APE_NOWINDOWS_H
82 
83 #endif // #ifndef _WIN32
84