Subversion Repositories freemyipod

Rev

Rev 160 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
160 theseven 1
/* fake16.h -- fake the strict 16-bit memory model for test purposes
2
 
3
   This file is part of the UCL data compression library.
4
 
5
   Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer
6
   All Rights Reserved.
7
 
8
   The UCL library is free software; you can redistribute it and/or
9
   modify it under the terms of the GNU General Public License as
10
   published by the Free Software Foundation; either version 2 of
11
   the License, or (at your option) any later version.
12
 
13
   The UCL library is distributed in the hope that it will be useful,
14
   but WITHOUT ANY WARRANTY; without even the implied warranty of
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
   GNU General Public License for more details.
17
 
18
   You should have received a copy of the GNU General Public License
19
   along with the UCL library; see the file COPYING.
20
   If not, write to the Free Software Foundation, Inc.,
21
   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
 
23
   Markus F.X.J. Oberhumer
24
   <markus@oberhumer.com>
25
 */
26
 
27
 
28
/*
29
 * NOTE:
30
 *   this file is *only* for testing the strict 16-bit memory model
31
 *   on a 32-bit machine. Because things like integral promotion,
32
 *   size_t and ptrdiff_t cannot be faked this is no real substitute
33
 *   for testing under a real 16-bit system.
34
 *
35
 *   See also <ucl/ucl16bit.h>
36
 *
37
 *   Usage: #include "src/fake16.h" at the top of <ucl/uclconf.h>
38
 */
39
 
40
 
41
#ifndef __UCLFAKE16BIT_H
42
#define __UCLFAKE16BIT_H
43
 
44
#ifdef __UCLCONF_H
45
#  error "include this file before uclconf.h"
46
#endif
47
 
48
#include <limits.h>
49
 
50
#if (USHRT_MAX == 0xffff)
51
 
52
#ifdef __cplusplus
53
extern "C" {
54
#endif
55
 
56
#define __UCL16BIT_H        /* do not use <ucl/ucl16bit.h> */
57
 
58
#define __UCL_STRICT_16BIT
59
#define __UCL_FAKE_STRICT_16BIT
60
 
61
#define UCL_99_UNSUPPORTED
62
#define UCL_999_UNSUPPORTED
63
 
64
typedef unsigned short      ucl_uint;
65
typedef short               ucl_int;
66
#define UCL_UINT_MAX        USHRT_MAX
67
#define UCL_INT_MAX         SHRT_MAX
68
 
69
#if 1
70
#define __UCL_NO_UNALIGNED
71
#define __UCL_NO_ALIGNED
72
#endif
73
 
74
#ifdef __cplusplus
75
} /* extern "C" */
76
#endif
77
 
78
#endif
79
 
80
#endif /* already included */
81