FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/riviera/rv/general.h @ 812:b522307de6f2
aci: psa_ss?.c done
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Sun, 05 Apr 2015 07:58:27 +0000 |
parents | afceeeb2cba1 |
children |
rev | line source |
---|---|
118
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 /****************************************************************************/ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 /* */ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 /* Name general.h */ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 /* */ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 /* Function this file contains common data type definitions used */ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 /* throughout the SWE */ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 /* */ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 /* Date Modification */ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 /* ----------------------- */ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 /* 3/12/99 Create */ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 /* **************************************************************************/ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 /* 10/27/1999 David Lamy-Charrier: remove declaration of ntohs, htons, */ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 /* ntohl, htonl in order to avoid conflict */ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 /* with winsock.h */ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 /* */ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 /* 11/30/1999 Pascal Pompei: 'string.h' included in order to define memcmp,*/ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 /* memset and memcpy functions. */ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 /* */ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 /* */ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 /****************************************************************************/ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 #ifndef GENERAL_H |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 #define GENERAL_H |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 #ifdef _WINDOWS |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 #include <string.h> |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 #endif |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 /* WINDOWS */ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 #ifdef _WINDOWS |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 typedef unsigned short UINT16; |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 typedef unsigned int UINT32; |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 typedef unsigned char UBYTE; |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 typedef short SHORT; |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 typedef int BOOL; |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 /* BOARD */ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
38 #else |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
39 #ifndef __TYPEDEFS_H__ /* This #define allows to Condat to use general.h without conflict */ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
40 typedef unsigned short UINT16; |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
41 typedef unsigned char UBYTE; |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
42 typedef short SHORT; |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 typedef signed char BYTE; |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
44 #if !defined (BOOL_FLAG) |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 #define BOOL_FLAG |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 typedef unsigned char BOOL; |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 #endif |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
48 typedef unsigned short USHORT; |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
49 typedef unsigned int ULONG; |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
50 #endif |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
51 typedef unsigned long UINT32; |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
52 #endif |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 typedef unsigned char UINT8; |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
55 typedef signed char INT8; |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
56 typedef short INT16; |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
57 typedef int INT32; |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
58 typedef unsigned char BOOLEAN; |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
59 |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
60 typedef void (*FUNC)(void); /* pointer to a function */ |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
62 #define OK 1 |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
63 |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
64 #ifndef NULL |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
65 #define NULL 0 |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
66 #endif |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
67 |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
68 #ifndef TRUE |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
69 #define TRUE 1 |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
70 #endif |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
71 |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
72 #ifndef FALSE |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
73 #define FALSE 0 |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
74 #endif |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
75 |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
76 |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
77 #define htons ntohs |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
78 #define htonl ntohl |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
79 |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
80 |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
81 #if !defined(_WIN32) |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
82 #define ntohs(n) (n) |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
83 #define ntohl(n) (n) |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
84 #define ntoh6(n) (n) |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
85 #endif |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
86 |
21de8d8e6ea7
checking in Riviera code from the Sotomodem version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
87 #endif /* #ifndef GENERAL_H */ |