summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/modplug/stdafx.h
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/modplug/stdafx.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/modplug/stdafx.h107
1 files changed, 107 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/modplug/stdafx.h b/core/multimedia/opieplayer/modplug/stdafx.h
new file mode 100644
index 0000000..774eefb
--- a/dev/null
+++ b/core/multimedia/opieplayer/modplug/stdafx.h
@@ -0,0 +1,107 @@
1/*
2 * This program is free software; you can redistribute it and modify it
3 * under the terms of the GNU General Public License as published by the
4 * Free Software Foundation; either version 2 of the license or (at your
5 * option) any later version.
6 *
7 * Authors: Rani Assaf <rani@magic.metawire.com>,
8 * Olivier Lapicque <olivierl@jps.net>,
9 * Adam Goode <adam@evdebs.org> (endian and char fixes for PPC)
10*/
11
12#ifndef _STDAFX_H_
13#define _STDAFX_H_
14
15#include <qglobal.h> // for Q_PACKED
16
17#ifdef WIN32
18
19#pragma warning (disable:4201)
20#pragma warning (disable:4514)
21#include <windows.h>
22#include <windowsx.h>
23#include <mmsystem.h>
24#include <stdio.h>
25
26inline void ProcessPlugins(int n) {}
27
28#else
29#include <stdlib.h>
30#include <stdio.h>
31#include <string.h>
32
33typedef signed char CHAR;
34typedef unsigned char UCHAR;
35typedef unsigned char* PUCHAR;
36typedef unsigned short USHORT;
37typedef unsigned long ULONG;
38typedef unsigned long UINT;
39typedef unsigned long DWORD;
40typedef long LONG;
41typedef unsigned short WORD;
42typedef unsigned char BYTE;
43typedef unsigned char * LPBYTE;
44typedef bool BOOL;
45typedef char * LPSTR;
46typedef void * LPVOID;
47typedef long * LPLONG;
48typedef unsigned long * LPDWORD;
49typedef unsigned short * LPWORD;
50typedef const char * LPCSTR;
51typedef long long LONGLONG;
52typedef void * PVOID;
53
54
55inline LONG MulDiv (long a, long b, long c)
56{
57 // if (!c) return 0;
58 return ((unsigned long long) a * (unsigned long long) b ) / c;
59}
60
61#ifdef __GNUG__
62#define __cdecl
63#define VOID void
64#define MODPLUG_NO_FILESAVE
65#define __declspec(BLAH)
66#define NO_AGC
67#define LPCTSTR LPCSTR
68#define lstrcpyn strncpy
69#define lstrcpy strcpy
70#define lstrcmp strcmp
71#define WAVE_FORMAT_PCM 1
72//#define ENABLE_EQ
73#endif
74
75#define GHND 0
76
77inline signed char * GlobalAllocPtr(unsigned int, size_t size)
78{
79 signed char * p = (signed char *) malloc(size);
80
81 if (p != NULL) memset(p, 0, size);
82 return p;
83}
84
85inline void ProcessPlugins(int ) {}
86
87#define GlobalFreePtr(p) free((void *)(p))
88
89#ifndef strnicmp
90 #define strnicmp(a,b,c) strncasecmp(a,b,c)
91#endif
92 #define wsprintf sprintf
93
94#ifndef FALSE
95 #define FALSEfalse
96#endif
97
98#ifndef TRUE
99 #define TRUEtrue
100#endif
101
102#endif // WIN32
103
104#endif
105
106
107