Crossfire Client, Branches
R11627
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
client-types.h
Go to the documentation of this file.
1
/*
2
* static char *rcsid_client_types_h =
3
* "$Id: client-types.h 11626 2009-04-04 12:41:46Z lalo $";
4
*/
5
/*
6
Crossfire client, a client program for the crossfire program.
7
8
Copyright (C) 2001 Mark Wedel & Crossfire Development Team
9
10
This program is free software; you can redistribute it and/or modify
11
it under the terms of the GNU General Public License as published by
12
the Free Software Foundation; either version 2 of the License, or
13
(at your option) any later version.
14
15
This program is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
GNU General Public License for more details.
19
20
You should have received a copy of the GNU General Public License
21
along with this program; if not, write to the Free Software
22
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23
24
The author can be reached via e-mail to crossfire-devel@real-time.com
25
*/
26
27
#ifndef CLIENT_TYPES_H
28
#define CLIENT_TYPES_H
29
#include <
cconfig.h
>
30
31
32
/* If using autoconf, use it to pick up the necessary files. Otherwise,
33
* we will draw on includes.h
34
*/
35
#include <
config.h
>
36
#include <stdio.h>
37
#include <stdlib.h>
38
#include <sys/types.h>
39
40
#ifdef HAVE_SYS_TIME_H
41
# include <sys/time.h>
42
#endif
43
44
#include <time.h>
45
46
#ifdef HAVE_STRING_H
47
# include <string.h>
48
#endif
49
50
#ifdef HAVE_UNISTD_H
51
# include <unistd.h>
52
#endif
53
54
#ifdef HAVE_FCNTL_H
55
# include <fcntl.h>
56
#endif
57
58
#ifdef WIN32
59
# include <winsock2.h>
60
#endif
61
62
#ifdef HAVE_PTHREAD_H
63
# include <pthread.h>
64
#endif
65
66
/* Just some handy ones I like to use */
67
#ifndef FALSE
68
#define FALSE 0
69
#endif
70
#ifndef TRUE
71
#define TRUE 1
72
#endif
73
74
#ifndef WIN32
75
76
/* Set of common types used through the program and modules */
77
typedef
unsigned
int
uint32
;
78
typedef
signed
int
sint32
;
79
typedef
unsigned
short
uint16
;
80
typedef
signed
short
sint16
;
81
typedef
unsigned
char
uint8
;
82
typedef
signed
char
sint8
;
83
84
#if SIZEOF_LONG == 8
85
typedef
unsigned
long
uint64;
86
typedef
signed
long
sint64;
87
#define FMT64 "ld"
88
#define FMT64U "ld"
89
#elif SIZEOF_LONG_LONG == 8
90
typedef
unsigned
long
long
uint64;
91
typedef
signed
long
long
sint64;
92
#define FMT64 "lld"
93
#define FMT64U "lld"
94
#else
95
#error do not know how to get a 64 bit value on this system.
96
#error correct and send mail to crossfire-devel on how to do this.
97
#endif
98
99
#else
100
/* Windows specific defines */
101
102
typedef
unsigned
__int64 uint64;
103
typedef
signed
__int64 sint64;
104
typedef
unsigned
__int32
uint32
;
105
typedef
signed
__int32
sint32
;
106
typedef
unsigned
__int16
uint16
;
107
typedef
signed
__int16
sint16
;
108
typedef
unsigned
char
uint8
;
109
typedef
signed
char
sint8
;
110
#define FMT64 "I64d"
111
#define FMT64U "I64u"
112
113
/* mingw defines rand and srand only */
114
#ifndef random
115
#define random rand
116
#endif
117
#ifndef srandom
118
#define srandom srand
119
#endif
120
121
#endif
122
123
#ifndef SOL_TCP
124
#define SOL_TCP IPPROTO_TCP
125
#endif
126
127
128
#define MAX_BUF 256
129
#define BIG_BUF 1024
130
131
/* used to register gui callbacks to extended texts
132
* (which are supposed to be handled more friendly than raw text)*/
133
typedef
void (*
ExtTextManager
)(
int
flag,
int
type,
int
subtype,
char
* message);
134
135
typedef
struct
TextManager
{
136
int
type
;
137
ExtTextManager
callback
;
138
struct
TextManager
*
next
;
139
}
TextManager
;
140
141
#endif
TextManager
struct TextManager TextManager
sint16
signed short sint16
Definition:
client-types.h:80
TextManager
Definition:
client-types.h:135
ExtTextManager
void(* ExtTextManager)(int flag, int type, int subtype, char *message)
Definition:
client-types.h:133
config.h
TextManager::type
int type
Definition:
client-types.h:136
TextManager::callback
ExtTextManager callback
Definition:
client-types.h:137
uint16
unsigned short uint16
Definition:
client-types.h:79
uint32
unsigned int uint32
Definition:
client-types.h:77
sint32
signed int sint32
Definition:
client-types.h:78
TextManager::next
struct TextManager * next
Definition:
client-types.h:138
sint8
signed char sint8
Definition:
client-types.h:82
uint8
unsigned char uint8
Definition:
client-types.h:81
cconfig.h
crossfire-code
client
branches
1.12
common
client-types.h
Generated on Fri Nov 16 2018 02:05:34 for Crossfire Client, Branches by
1.8.6