1
/*----------------------------------------------------------------------*\
3
sysdep.h Date: 1995-08-19/thoni@softlab.se
5
System dependencies file for Alan Adventure Language system
7
N.B. The test for symbols used here should really be of three types
8
- processor name (like PC, x86, ...)
9
- os name (DOS, WIN32, Solaris2, ...)
10
- compiler name and version (DJGPP, CYGWIN, GCC271, THINK-C, ...)
12
The set symbols should indicate if a feature is on or off like the GNU
13
AUTOCONFIG package does.
15
This is not completely done yet!
17
\*----------------------------------------------------------------------*/
22
/* Place definitions of OS and compiler here if necessary */
33
#ifdef _INCLUDE_HPUX_SOURCE
77
#define HAVE_SHORT_FILENAMES
81
/*----------------------------------------------------------------------
83
Below follows OS and compiler dependent settings. They should not be
84
changed except for introducing new sections when porting to new
103
/* Our VAXC doesn't define __STDC__ */
118
#define strdup _strdup
121
/***********************/
122
/* ISO character sets? */
123
/***********************/
125
/* Common case first */
127
#define NATIVECHARSET 0
133
#define NATIVECHARSET 0
134
#else /* Glk is ISO, no matter what the OS */
140
#define NATIVECHARSET 2
147
#define NATIVECHARSET 2
154
#define NATIVECHARSET 1
159
/**************************/
160
/* Strings for file modes */
161
/**************************/
162
#define READ_MODE "r"
163
#define WRITE_MODE "w"
166
/* File open mode (binary) */
168
#define READ_MODE "rb"
170
#define WRITE_MODE "wb"
174
/* File open mode (binary) */
176
#define READ_MODE "rb"
178
#define WRITE_MODE "wb"
182
/* File open mode (binary) */
184
#define READ_MODE "rb"
186
#define WRITE_MODE "wb"
208
/****************************/
209
/* Allocates cleared bytes? */
210
/****************************/
230
/* don't need TERMIO */
243
/*******************************/
244
/* Is ANSI control available? */
245
/*******************************/
248
/* don't need ANSI */
257
/******************************/
258
/* Use the READLINE function? */
259
/******************************/
262
/* Glk always uses readline(), no matter what the OS */
280
/* Special cases and definition overrides */
292
extern char *strdup(char str[]);
294
/* Cheat implementation of strftime */
295
extern size_t strftime (char *, size_t, const char *, const struct tm *);
301
extern char *strdup(char *str);
309
#define EXIT_SUCCESS 0
310
#define EXIT_FAILURE 1
317
/* Native character functions */
318
extern int isSpace(int c); /* IN - Native character to test */
319
extern int isLower(int c); /* IN - Native character to test */
320
extern int isUpper(int c); /* IN - Native character to test */
321
extern int isLetter(int c); /* IN - Native character to test */
322
extern int toLower(int c); /* IN - Native character to convert */
323
extern int toUpper(int c); /* IN - Native character to convert */
324
extern char *strlow(char str[]); /* INOUT - Native string to convert */
325
extern char *strupp(char str[]); /* INOUT - Native string to convert */
327
/* ISO character functions */
328
extern int isISOLetter(int c); /* IN - ISO character to test */
329
extern char toLowerCase(int c); /* IN - ISO character to convert */
330
extern char toUpperCase(int c); /* IN - ISO character to convert */
331
extern char *stringLower(char str[]); /* INOUT - ISO string to convert */
332
extern char *stringUpper(char str[]); /* INOUT - ISO string to convert */
334
/* ISO string conversion functions */
335
extern void toIso(char copy[], /* OUT - Mapped string */
336
char original[], /* IN - string to convert */
337
int charset); /* IN - The current character set */
339
extern void fromIso(char copy[], /* OUT - Mapped string */
340
char original[]); /* IN - string to convert */
342
extern void toNative(char copy[], /* OUT - Mapped string */
343
char original[], /* IN - string to convert */
344
int charset); /* IN - current character set */
346
extern int isSpace();
347
extern int isLower();
348
extern int isUpper();
349
extern int isLetter();
350
extern int toLower();
351
extern int toUpper();
352
extern char *strlow();
353
extern char *strupp();
355
extern int isISOLetter();
356
extern char toLowerCase();
357
extern char toUpperCase();
358
extern char *stringLower();
359
extern char *stringUpper();
362
extern void fromIso();
365
#endif /* -- sysdep.h -- */