| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
#ifndef _SYSDEP_H_ |
| 14 |
#define _SYSDEP_H_ |
| 15 |
|
| 16 |
#include <stdbool.h> |
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
#define HAVE_TERMIOS |
| 23 |
|
| 24 |
#ifdef __MINGW32__ |
| 25 |
#define __windows__ |
| 26 |
#undef HAVE_TERMIOS |
| 27 |
#endif |
| 28 |
|
| 29 |
#ifdef HAVE_WINGLK |
| 30 |
#define HAVE_GLK |
| 31 |
#endif |
| 32 |
|
| 33 |
#ifdef HAVE_GARGLK |
| 34 |
#define HAVE_GLK |
| 35 |
#endif |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
#include <stdio.h> |
| 51 |
#include <ctype.h> |
| 52 |
#include <unistd.h> |
| 53 |
|
| 54 |
|
| 55 |
#ifdef __STDC__ |
| 56 |
#include <stdlib.h> |
| 57 |
#include <string.h> |
| 58 |
#endif |
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
#define ISO 1 |
| 67 |
#define NATIVECHARSET 0 |
| 68 |
|
| 69 |
#ifdef HAVE_GLK |
| 70 |
#undef ISO |
| 71 |
#define ISO 1 |
| 72 |
#undef NATIVECHARSET |
| 73 |
#define NATIVECHARSET 0 |
| 74 |
#else |
| 75 |
|
| 76 |
#ifdef __win__ |
| 77 |
#undef ISO |
| 78 |
#define ISO 1 |
| 79 |
#undef NATIVECHARSET |
| 80 |
#define NATIVECHARSET 2 |
| 81 |
#endif |
| 82 |
|
| 83 |
#endif |
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
#define READ_MODE "rb" |
| 89 |
#define WRITE_MODE "wb" |
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
#ifdef HAVE_GLK |
| 97 |
# undef HAVE_TERMIOS |
| 98 |
#else |
| 99 |
# ifdef __CYGWIN__ |
| 100 |
# define HAVE_TERMIOS |
| 101 |
# endif |
| 102 |
# ifdef __unix__ |
| 103 |
# define HAVE_TERMIOS |
| 104 |
# endif |
| 105 |
#endif |
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
#ifdef HAVE_GLK |
| 112 |
# undef HAVE_ANSI_CONTROL |
| 113 |
#else |
| 114 |
# ifdef __CYGWIN__ |
| 115 |
# define HAVE_ANSI_CONTROL |
| 116 |
# endif |
| 117 |
#endif |
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
#define USE_READLINE |
| 123 |
#ifdef SOME_PLATFORM_WHICH_CANT_USE_READLINE |
| 124 |
# undef USE_READLINE |
| 125 |
#endif |
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
extern int isSpace(unsigned int c); |
| 130 |
extern int isLower(unsigned int c); |
| 131 |
extern int isUpper(unsigned int c); |
| 132 |
extern int isLetter(unsigned int c); |
| 133 |
extern int toLower(unsigned int c); |
| 134 |
extern int toUpper(unsigned int c); |
| 135 |
extern void stringToLowerCase(char str[]); |
| 136 |
|
| 137 |
extern bool equalStrings(char str1[], char str2[]); |
| 138 |
|
| 139 |
extern int littleEndian(void); |
| 140 |
|
| 141 |
extern char *baseNameStart(char *fullPathName); |
| 142 |
|
| 143 |
#endif |