Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

stdafx.h

Go to the documentation of this file.
00001 /*
00002  * This program is  free software; you can redistribute it  and modify it
00003  * under the terms of the GNU  General Public License as published by the
00004  * Free Software Foundation; either version 2  of the license or (at your
00005  * option) any later version.
00006  *
00007  * Authors: Rani Assaf <rani@magic.metawire.com>,
00008  *          Olivier Lapicque <olivierl@jps.net>,
00009  *          Adam Goode       <adam@evdebs.org> (endian and char fixes for PPC)
00010 */
00011 
00012 #ifndef _STDAFX_H_
00013 #define _STDAFX_H_
00014 
00015 #include <qglobal.h> // for Q_PACKED
00016 
00017 #ifdef WIN32
00018 
00019 #pragma warning (disable:4201)
00020 #pragma warning (disable:4514)
00021 #include <windows.h>
00022 #include <windowsx.h>
00023 #include <mmsystem.h>
00024 #include <stdio.h>
00025 
00026 inline void ProcessPlugins(int n) {}
00027 
00028 #else
00029 #include <stdlib.h>
00030 #include <stdio.h>
00031 #include <string.h>
00032 
00033 typedef signed char CHAR;
00034 typedef unsigned char UCHAR;
00035 typedef unsigned char* PUCHAR;
00036 typedef unsigned short USHORT;
00037 typedef unsigned long ULONG;
00038 typedef unsigned long UINT;
00039 typedef unsigned long DWORD;
00040 typedef long LONG;
00041 typedef unsigned short WORD;
00042 typedef unsigned char BYTE;
00043 typedef unsigned char * LPBYTE;
00044 typedef bool BOOL;
00045 typedef char * LPSTR;
00046 typedef void *  LPVOID;
00047 typedef long * LPLONG;
00048 typedef unsigned long * LPDWORD;
00049 typedef unsigned short * LPWORD;
00050 typedef const char * LPCSTR;
00051 typedef long long LONGLONG;
00052 typedef void * PVOID;
00053 
00054 
00055 inline LONG MulDiv (long a, long b, long c)
00056 {
00057   // if (!c) return 0;
00058   return ((unsigned long long) a * (unsigned long long) b ) / c;
00059 }
00060 
00061 #ifdef __GNUG__
00062 #define __cdecl
00063 #define VOID void
00064 #define MODPLUG_NO_FILESAVE
00065 #define __declspec(BLAH)
00066 #define NO_AGC
00067 #define LPCTSTR LPCSTR
00068 #define lstrcpyn strncpy
00069 #define lstrcpy strcpy
00070 #define lstrcmp strcmp
00071 #define WAVE_FORMAT_PCM 1
00072 //#define ENABLE_EQ
00073 #endif
00074 
00075 #define  GHND   0
00076 
00077 inline signed char * GlobalAllocPtr(unsigned int, size_t size)
00078 { 
00079   signed char * p = (signed char *) malloc(size);
00080 
00081   if (p != NULL) memset(p, 0, size);
00082   return p;
00083 }
00084 
00085 inline void ProcessPlugins(int ) {}
00086 
00087 #define GlobalFreePtr(p) free((void *)(p))
00088 
00089 #ifndef strnicmp
00090 #define strnicmp(a,b,c)         strncasecmp(a,b,c)
00091 #endif
00092 #define wsprintf                        sprintf
00093 
00094 #ifndef FALSE
00095 #define FALSE   false
00096 #endif
00097 
00098 #ifndef TRUE
00099 #define TRUE    true
00100 #endif
00101 
00102 #endif // WIN32
00103 
00104 #endif
00105 
00106 
00107 

Generated on Sat Nov 5 16:15:42 2005 for OPIE by  doxygen 1.4.2