1 /* 2 ** Nofrendo (c) 1998-2000 Matthew Conte (matt@conte.com) 3 ** 4 ** 5 ** This program is free software; you can redistribute it and/or 6 ** modify it under the terms of version 2 of the GNU Library General 7 ** Public License as published by the Free Software Foundation. 8 ** 9 ** This program is distributed in the hope that it will be useful, 10 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 11 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 ** Library General Public License for more details. To obtain a 13 ** copy of the GNU Library General Public License, write to the Free 14 ** Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 15 ** MA 02110-1301, USA. 16 ** 17 ** Any permitted reproduction of these routines, in whole or in part, 18 ** must bear this legend. 19 ** 20 ** 21 ** types.h 22 ** 23 ** Data type definitions 24 ** $Id: types.h,v 1.4 2004/08/27 19:33:37 valtri Exp $ 25 */ 26 27 #ifndef _NOSEFART_TYPES_H_ 28 #define _NOSEFART_TYPES_H_ 29 30 #if defined(HAVE_CONFIG_H) && !defined(__XINE_LIB_CONFIG_H__) 31 # error config.h not included 32 #endif 33 34 /* Define this if running on little-endian (x86) systems */ 35 36 #ifndef DCPLAYA 37 # define HOST_LITTLE_ENDIAN 38 #endif 39 40 #ifdef __GNUC__ 41 #define INLINE static inline 42 #elif defined(WIN32) 43 #define INLINE static __inline 44 #else /* crapintosh? */ 45 #define INLINE static 46 #endif 47 48 /* These should be changed depending on the platform */ 49 50 51 52 #ifdef __BEOS__ /* added by Eli Dayan (for compiling under BeOS) */ 53 54 /* use types in the BeOS Support Kit instead */ 55 #include <be/support/SupportDefs.h> 56 #elif defined (DCPLAYA) /* $$$ added by ben (for compiling with dcplaya) */ 57 # include <arch/types.h> 58 #else 59 typedef char int8; 60 typedef short int16; 61 typedef int int32; 62 63 typedef unsigned char uint8; 64 typedef unsigned short uint16; 65 typedef unsigned int uint32; 66 67 #endif 68 69 typedef uint8 boolean; 70 71 #ifndef TRUE 72 #define TRUE 1 73 #endif 74 #ifndef FALSE 75 #define FALSE 0 76 #endif 77 78 #ifndef NULL 79 #define NULL ((void *) 0) 80 #endif 81 82 #ifdef NOFRENDO_DEBUG 83 #include <stdlib.h> 84 #include "memguard.h" 85 #include "log.h" 86 #define ASSERT(expr) if (FALSE == (expr))\ 87 {\ 88 log_printf("ASSERT: line %d of %s\n", __LINE__, __FILE__);\ 89 log_shutdown();\ 90 exit(1);\ 91 } 92 #define ASSERT_MSG(msg) {\ 93 log_printf("ASSERT: %s\n", msg);\ 94 log_shutdown();\ 95 exit(1);\ 96 } 97 #else /* Not debugging */ 98 #include "memguard.h" 99 #define ASSERT(expr) 100 #define ASSERT_MSG(msg) 101 #endif 102 103 #endif /* _NOSEFART_TYPES_H_ */ 104 105 /* 106 ** $Log: types.h,v $ 107 ** Revision 1.4 2004/08/27 19:33:37 valtri 108 ** MINGW32 port. Engine library and most of plugins compiles now. 109 ** 110 ** List of some changes: 111 ** - replaced some _MSC_VER by more common WIN32 112 ** - define INTLDIR, remove -static flag for included intl 113 ** - shared more common CFLAGS with DEBUG_CFLAGS 114 ** - use WIN32_CFLAGS for all building 115 ** - separate some flags into THREAD_CFLAGS_CONFIG, 116 ** THREAD_CFLAGS_CONFIG and ZLIB_LIB_CONFIG for public xine-config, 117 ** automatically use internal libs if necessary 118 ** - don't warn about missing X for mingw and cygwin 119 ** - libw32dll disabled for WIN32 (making native loader would be 120 ** interesting, or porting wine code to Windows? :->) 121 ** - DVB and RTP disabled for WIN32, not ported yet 122 ** - fix build and fix a warning in cdda 123 ** - fix build for nosefart and libfaad 124 ** - implement configure option --disable-freetype 125 ** - sync libxine.pc and xine-config.in 126 ** - add -liberty to goom under WIN32 127 ** - move original build files from included phread and zlib into archives 128 ** and replace them by autotools 129 ** 130 ** Revision 1.3 2003/01/11 15:53:53 tmmm 131 ** make the Nosefart engine aware of the config's WORDS_BIGENDIAN #define 132 ** 133 ** Revision 1.2 2003/01/09 19:50:04 jkeil 134 ** NSF audio files were crashing on SPARC. 135 ** 136 ** - Define the correct HOST_ENDIAN for SPARC 137 ** - remove unaligned memory accesses 138 ** 139 ** Revision 1.1 2003/01/08 07:04:36 tmmm 140 ** initial import of Nosefart sources 141 ** 142 ** Revision 1.7 2000/07/04 04:46:44 matt 143 ** moved INLINE define from osd.h 144 ** 145 ** Revision 1.6 2000/06/09 15:12:25 matt 146 ** initial revision 147 ** 148 */ 149