FreeCalypso > hg > fc-tourmaline
comparison src/cs/riviera/rv/general.h @ 0:4e78acac3d88
src/{condat,cs,gpf,nucleus}: import from Selenite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 16 Oct 2020 06:23:26 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4e78acac3d88 |
---|---|
1 /****************************************************************************/ | |
2 /* */ | |
3 /* Name general.h */ | |
4 /* */ | |
5 /* Function this file contains common data type definitions used */ | |
6 /* throughout the SWE */ | |
7 /* */ | |
8 /* Date Modification */ | |
9 /* ----------------------- */ | |
10 /* 3/12/99 Create */ | |
11 /* **************************************************************************/ | |
12 /* 10/27/1999 David Lamy-Charrier: remove declaration of ntohs, htons, */ | |
13 /* ntohl, htonl in order to avoid conflict */ | |
14 /* with winsock.h */ | |
15 /* */ | |
16 /* 11/30/1999 Pascal Pompei: 'string.h' included in order to define memcmp,*/ | |
17 /* memset and memcpy functions. */ | |
18 /* */ | |
19 /* */ | |
20 /****************************************************************************/ | |
21 | |
22 #ifndef GENERAL_H | |
23 #define GENERAL_H | |
24 | |
25 #ifdef _WINDOWS | |
26 #include <string.h> | |
27 #endif | |
28 | |
29 /* WINDOWS */ | |
30 #ifdef _WINDOWS | |
31 typedef unsigned short UINT16; | |
32 typedef unsigned int UINT32; | |
33 typedef unsigned char UBYTE; | |
34 typedef short SHORT; | |
35 typedef int BOOL; | |
36 | |
37 /* BOARD */ | |
38 #else | |
39 #ifndef __TYPEDEFS_H__ /* This #define allows to Condat to use general.h without conflict */ | |
40 #ifndef NUCLEUS | |
41 typedef unsigned short UINT16; | |
42 #endif | |
43 typedef unsigned char UBYTE; | |
44 typedef short SHORT; | |
45 typedef signed char BYTE; | |
46 #if !defined (BOOL_FLAG) | |
47 #define BOOL_FLAG | |
48 typedef unsigned char BOOL; | |
49 #endif | |
50 typedef unsigned short USHORT; | |
51 typedef unsigned int ULONG; | |
52 #endif | |
53 #ifndef NUCLEUS | |
54 typedef unsigned long UINT32; | |
55 #endif | |
56 #endif | |
57 | |
58 #ifndef NUCLEUS | |
59 typedef unsigned char UINT8; | |
60 typedef signed char INT8; | |
61 typedef short INT16; | |
62 typedef int INT32; | |
63 typedef unsigned char BOOLEAN; | |
64 #endif | |
65 | |
66 typedef void (*FUNC)(void); /* pointer to a function */ | |
67 | |
68 #define OK 1 | |
69 | |
70 #ifndef NULL | |
71 #define NULL 0 | |
72 #endif | |
73 | |
74 #ifndef TRUE | |
75 #define TRUE 1 | |
76 #endif | |
77 | |
78 #ifndef FALSE | |
79 #define FALSE 0 | |
80 #endif | |
81 | |
82 | |
83 #define htons ntohs | |
84 #define htonl ntohl | |
85 | |
86 | |
87 #if !defined(_WIN32) | |
88 #define ntohs(n) (n) | |
89 #define ntohl(n) (n) | |
90 #define ntoh6(n) (n) | |
91 #endif | |
92 | |
93 #endif /* #ifndef GENERAL_H */ |