File: includes.h

package info (click to toggle)
crossfire-client 0.94.3-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 456 kB
  • ctags: 664
  • sloc: ansic: 5,629; makefile: 43; perl: 16
file content (198 lines) | stat: -rw-r--r-- 4,850 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
/*
 * static char *rcsid_includes_h =
 *   "$Id: includes.h,v 1.3 1998/04/16 01:36:56 master Exp $";
 */

/*
    CrossFire, A Multiplayer game for X-windows

    Copyright (C) 1994 Mark Wedel
    Copyright (C) 1992 Frank Tore Johansen

    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., 675 Mass Ave, Cambridge, MA 02139, USA.

    The author can be reached via e-mail to master@rahul.net
*/

/* This is a copy of the 'includes' file from the server.  Stuff
 * has been added an removed in order for this to work properly
 * with the client.  This defiens a lot of machine/os/type flags, and
 * is thus very useful
 *
 * This includes many files.  copies of the osf.h, sgi.h and sunos.h
 * files are included in this file to provide function prototypes
 * and other things that were needed.
 */

#ifndef INCLUDES_H
#define INCLUDES_H

#define ASSERT(x)
#if 0
#define ASSERT(x) if (!(x)) { kill(getpid(),11);}
#endif

#if defined(osf1) && !defined(__osf__)
#  define	__osf__
#endif

#if defined(sgi) && !defined(__sgi__)
#  define __sgi__
#endif

#ifdef sun
#  ifndef __sun__
#    define __sun__
#  endif
#endif

#if defined(ultrix) && !defined(__ultrix__)
#  define __ultrix__
#endif

#include <stdio.h>
#include <stdarg.h>	/* varargs */
#include <string.h>	/* lots of stuff, malloc is one */
#include <stdlib.h>
#include <memory.h>	/* for memset */
/*#include <varargs.h>*/


/* tempnam() is not declared ifdef __STRICT_ANSI__ or on NeXT's*/
#if defined(NeXT)
extern char *tempnam(char *dir, char *pfx);
#endif


#if defined(__sun__) /* && defined(SVR4) */
#include <unistd.h>	/* gives us getpid */
#endif

#if defined(__pyrsoft)
#include <unistd.h>     /* gives us SC_OPEN_MAX */
#endif

#include <sys/types.h>
#include <sys/time.h>

#if defined(_IBMR2) 
#  include <time.h>
#  include <math.h> /* Ack!  Can anyone with IBM tell me what requires this? */
#endif

#ifndef sgi
#  include <sys/timeb.h>
#endif

#ifdef __osf__
#  include <unistd.h>
/*
 * Made this useless file to avoid warnings when compiling on a DEC/OSF1
 * machine, since it is missing a few prototypes.
 * Created:	30-12-93
 * Author:	Kjetil W. J|rgensen, <jorgens@pvv.unit.no>
 */

#ifndef __alpha
long random(void);
long srandom (int);
char *crypt(char *, char *);
void *memset(void *, int, size_t);
int ftime(struct timeb *);
void bcopy(char *, char *, int);
void bzero(char *, int);

#endif

#endif

#ifdef __sgi__
#  include <unistd.h>
#  include <math.h>
/*
 * Made this useless file to avoid warnings when compiling on a SGI,
 * since it is missing a few prototypes.
 * Created:	03-12-93
 * Author:	Kjetil W. J|rgensen, <jorgens@pvv.unit.no>
 */

void bcopy(const void *, void *, int);
/*char *crypt(char *, char *);*/ /* Supposedly not needed with irix 5.2*/
int kill (pid_t, int);


#endif

#ifdef linux
#  include <unistd.h>
#endif

#if defined (__sun__) && defined(StupidSunHeaders)

#ifndef SVR4

extern int malloc_debug(int);
int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
char _filbuf();
char *crypt(char *, char *);
char *strdup_local(char *);
int _flsbuf(char *, int);
int cfree(char *);
int fclose(FILE *);
int fgetc(FILE *);
int printf(char *, ...);
int fprintf(FILE *, char *, ...);
int vprintf(char *, va_list);
int vsprintf(char *, char *, va_list);
int vfprintf(FILE *, char *, va_list);
int fputs(char *, FILE *);
int fread(char *, int, int, FILE *);
int fwrite(char *, int, int, FILE *);
int scanf(char *, ...);
int fscanf(FILE *, char *, ...);
int sscanf(char *, char *, ...);
int ftime(struct timeb *);
int getdtablesize(void);
int gethostname(char *, int);
int gettimeofday(struct timeval *, struct timezone *);
int ioctl(int, int, ...);
int pclose(FILE *);
int puts(char *);
int rename(char *, char *);
int setpgrp(int, int);
int srandom(int);
int strcasecmp(char *, char *);
int strftime(char *, int, char *, struct tm *);
int strncasecmp(char *, char *, int);
int system(char *);
int ungetc(int, FILE *);
long random(void);
long strtol(char *, char **, int);
time_t time(time_t *);
void bcopy(char *, char *, int);
void bzero(char *, int);
void fflush(FILE *);
void fseek (FILE *, long, int);
void perror(char *);
void rewind(FILE *);

#endif
#endif

#ifdef DMALLOC
#include <dmalloc.h>
#endif

#endif /* INCLUDES_H */