File: watdefs.h

package info (click to toggle)
pluto-jpl-eph 0.0~git20180228-1.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 684 kB
  • sloc: cpp: 2,350; sh: 277; makefile: 131; perl: 64
file content (142 lines) | stat: -rw-r--r-- 3,037 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/* watdefs.h: header file for inter-compiler compatibility
Copyright (C) 2010, Project Pluto

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.    */

#ifdef __WATCOMC__
#ifndef bool
#define bool int
#endif
#ifndef true
#define true 1
#endif
#ifndef false
#define false 0
#endif
#ifdef __386__
#define BITS_32
#endif
#endif

#ifdef __GNUC__
#define BITS_32
#endif

#ifdef _WIN32
#define BITS_32
#endif

#ifdef BITS_32

#ifndef FAR
#define FAR
#endif

#ifndef _HUGE
#define _HUGE
#endif

#ifndef NEAR
#define NEAR
#endif

#ifndef PASCAL
#define PASCAL
#endif

#define FMEMCPY      memcpy
#define FMEMCMP      memcmp
#define FMEMICMP     memicmp
#define FMEMMOVE     memmove
#define FMEMSET      memset
#define FSTRCPY      strcpy
#define FSTRSTR      strstr
#define FSTRCAT      strcat
#define FSTRNCPY     strncpy
#define FSTRICMP     stricmp
#define FSTRCMP      strcmp
#define FSTRLEN      strlen
#define FMALLOC      malloc
#define FCALLOC      calloc
#define FFREE        free
#define FREALLOC     realloc
#define STRUPR       strupr

#ifdef __WATCOMC__
#define _ftime        ftime
#define _timeb        timeb
#define _videoconfig videoconfig
#define _timezone    timezone
#define _tzset       tzset
#define _swab        swab
#define _unlink      unlink
// int _stricmp( char *s1, char *s2);
// int _memicmp( char *s1, char *s2, int n);
#endif
#endif

#ifndef BITS_32

#define _FAR       __far
#define _HUGE      huge

#ifndef FAR
#define FAR        far
#endif

#ifndef NEAR
#define NEAR       near
#endif

#ifndef PASCAL
#define PASCAL     pascal
#endif

#define FMEMCPY    _fmemcpy
#define FMEMCMP    _fmemcmp
#define FMEMICMP   _fmemicmp
#define FMEMMOVE   _fmemmove
#define FMEMSET    _fmemset
#define FSTRCPY    _fstrcpy
#define FSTRSTR    _fstrstr
#define FSTRCAT    _fstrcat
#define FSTRNCPY   _fstrncpy
#define FSTRLEN    _fstrlen
#define FSTRICMP   _fstricmp
#define FSTRCMP    _fstrcmp
#define FMALLOC    _fmalloc
#define FCALLOC    _fcalloc
#define FFREE      _ffree
#define FREALLOC   _frealloc
#define STRUPR     _strupr
#endif

#ifdef _WIN32
#define DLL_FUNC __stdcall
#else
#define DLL_FUNC
#endif

#define DLLPTR

/* __restrict is defined in MinGW and Digital Mars,  no matter what;  and
   in Watcom for C,  but not C++.  It's not in Visual C++ at all.  */

#if defined( __WATCOMC__) && defined( __cplusplus)
   #define __restrict
#elif defined( _MSC_VER)
   #define __restrict
#endif