annotate tremor/os_types.h @ 14294:90bcd37dba7f

fix string argument parsing (e.g. one char strings were not accepted)
author reimar
date Sat, 01 Jan 2005 19:03:22 +0000
parents 8631a3803289
children 40600d007493
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14280
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
1 /********************************************************************
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
2 * *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
3 * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
4 * *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
5 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
6 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
7 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
8 * *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
9 * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
10 * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
11 * *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
12 ********************************************************************
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
13
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
14 function: #ifdef jail to whip a few platforms into the UNIX ideal.
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
15
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
16 ********************************************************************/
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
17 #ifndef _OS_TYPES_H
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
18 #define _OS_TYPES_H
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
19
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
20 #ifdef _LOW_ACCURACY_
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
21 # define X(n) (((((n)>>22)+1)>>1) - ((((n)>>22)+1)>>9))
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
22 # define LOOKUP_T const unsigned char
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
23 #else
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
24 # define X(n) (n)
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
25 # define LOOKUP_T const ogg_int32_t
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
26 #endif
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
27
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
28 /* make it easy on the folks that want to compile the libs with a
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
29 different malloc than stdlib */
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
30 #define _ogg_malloc malloc
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
31 #define _ogg_calloc calloc
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
32 #define _ogg_realloc realloc
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
33 #define _ogg_free free
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
34
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
35 #ifdef _WIN32
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
36
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
37 # ifndef __GNUC__
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
38 /* MSVC/Borland */
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
39 typedef __int64 ogg_int64_t;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
40 typedef __int32 ogg_int32_t;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
41 typedef unsigned __int32 ogg_uint32_t;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
42 typedef __int16 ogg_int16_t;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
43 # else
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
44 /* Cygwin */
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
45 #include <_G_config.h>
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
46 typedef _G_int64_t ogg_int64_t;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
47 typedef _G_int32_t ogg_int32_t;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
48 typedef _G_uint32_t ogg_uint32_t;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
49 typedef _G_int16_t ogg_int16_t;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
50 # endif
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
51
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
52 #elif defined(__MACOS__)
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
53
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
54 # include <sys/types.h>
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
55 typedef SInt16 ogg_int16_t;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
56 typedef SInt32 ogg_int32_t;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
57 typedef UInt32 ogg_uint32_t;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
58 typedef SInt64 ogg_int64_t;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
59
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
60 #elif defined(__MACOSX__) /* MacOS X Framework build */
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
61
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
62 # include <sys/types.h>
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
63 typedef int16_t ogg_int16_t;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
64 typedef int32_t ogg_int32_t;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
65 typedef u_int32_t ogg_uint32_t;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
66 typedef int64_t ogg_int64_t;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
67
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
68 #elif defined(__BEOS__)
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
69
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
70 /* Be */
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
71 # include <inttypes.h>
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
72
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
73 #elif defined (__EMX__)
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
74
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
75 /* OS/2 GCC */
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
76 typedef short ogg_int16_t;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
77 typedef int ogg_int32_t;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
78 typedef unsigned int ogg_uint32_t;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
79 typedef long long ogg_int64_t;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
80
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
81 #else
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
82
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
83 # include <sys/types.h>
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
84 # include "config_types.h"
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
85
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
86 #endif
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
87
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
88 #endif /* _OS_TYPES_H */