comparison rogue5/extern.h @ 33:f502bf60e6e4

Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
author elwin
date Mon, 24 May 2010 20:10:59 +0000
parents
children 655c317b6237
comparison
equal deleted inserted replaced
32:2dcd75e6a736 33:f502bf60e6e4
1 /*
2 * Defines for things used in mach_dep.c
3 *
4 * @(#)extern.h 4.35 (Berkeley) 02/05/99
5 *
6 * Rogue: Exploring the Dungeons of Doom
7 * Copyright (C) 1980-1983, 1985, 1999 Michael Toy, Ken Arnold and Glenn Wichman
8 * All rights reserved.
9 *
10 * See the file LICENSE.TXT for full copyright and licensing information.
11 */
12
13
14 #ifdef HAVE_CONFIG_H
15 #ifdef PDCURSES
16 #undef HAVE_UNISTD_H
17 #undef HAVE_LIMITS_H
18 #undef HAVE_MEMORY_H
19 #undef HAVE_STRING_H
20 #endif
21 #include "config.h"
22 #elif defined(__DJGPP__)
23 #define HAVE_SYS_TYPES_H 1
24 #define HAVE_PROCESS_H 1
25 #define HAVE_PWD_H 1
26 #define HAVE_TERMIOS_H 1
27 #define HAVE_SETGID 1
28 #define HAVE_GETGID 1
29 #define HAVE_SETUID 1
30 #define HAVE_GETUID 1
31 #define HAVE_GETPASS 1
32 #define HAVE_SPAWNL 1
33 #define HAVE_ALARM 1
34 #define HAVE_ERASECHAR 1
35 #define HAVE_KILLCHAR 1
36 #elif defined(_WIN32)
37 #define HAVE_CURSES_H
38 #define HAVE_TERM_H
39 #define HAVE__SPAWNL
40 #define HAVE_SYS_TYPES_H
41 #define HAVE_PROCESS_H
42 #define HAVE_ERASECHAR 1
43 #define HAVE_KILLCHAR 1
44 #ifndef uid_t
45 typedef unsigned int uid_t;
46 #endif
47 #ifndef pid_t
48 typedef unsigned int pid_t;
49 #endif
50 #elif defined(__CYGWIN__)
51 #define HAVE_SYS_TYPES_H 1
52 #define HAVE_PWD_H 1
53 #define HAVE_PWD_H 1
54 #define HAVE_SYS_UTSNAME_H 1
55 #define HAVE_ARPA_INET_H 1
56 #define HAVE_UNISTD_H 1
57 #define HAVE_TERMIOS_H 1
58 #define HAVE_NCURSES_TERM_H 1
59 #define HAVE_ESCDELAY
60 #define HAVE_SETGID 1
61 #define HAVE_GETGID 1
62 #define HAVE_SETUID 1
63 #define HAVE_GETUID 1
64 #define HAVE_GETPASS 1
65 #define HAVE_GETPWUID 1
66 #define HAVE_WORKING_FORK 1
67 #define HAVE_ALARM 1
68 #define HAVE_SPAWNL 1
69 #define HAVE__SPAWNL 1
70 #define HAVE_ERASECHAR 1
71 #define HAVE_KILLCHAR 1
72 #else /* POSIX */
73 #define HAVE_SYS_TYPES_H 1
74 #define HAVE_PWD_H 1
75 #define HAVE_PWD_H 1
76 #define HAVE_SYS_UTSNAME_H 1
77 #define HAVE_ARPA_INET_H 1
78 #define HAVE_UNISTD_H 1
79 #define HAVE_TERMIOS_H 1
80 #define HAVE_TERM_H 1
81 #define HAVE_SETGID 1
82 #define HAVE_GETGID 1
83 #define HAVE_SETUID 1
84 #define HAVE_GETUID 1
85 #define HAVE_SETREUID 1
86 #define HAVE_SETREGID 1
87 #define HAVE_GETPASS 1
88 #define HAVE_GETPWUID 1
89 #define HAVE_WORKING_FORK 1
90 #define HAVE_ERASECHAR 1
91 #define HAVE_KILLCHAR 1
92 #ifndef _AIX
93 #define HAVE_GETLOADAVG 1
94 #endif
95 #define HAVE_ALARM 1
96 #endif
97
98 #ifdef __DJGPP__
99 #undef HAVE_GETPWUID /* DJGPP's limited version doesn't even work as documented */
100 #endif
101
102 /*
103 * Don't change the constants, since they are used for sizes in many
104 * places in the program.
105 */
106
107 #include <stdlib.h>
108
109 #undef SIGTSTP
110
111 #define MAXSTR 1024 /* maximum length of strings */
112 #define MAXLINES 32 /* maximum number of screen lines used */
113 #define MAXCOLS 80 /* maximum number of screen columns used */
114
115 #define RN (((seed = seed*11109+13849) >> 16) & 0xffff)
116 #ifdef CTRL
117 #undef CTRL
118 #endif
119 #define CTRL(c) (c & 037)
120
121 /*
122 * Now all the global variables
123 */
124
125 extern int got_ltc, in_shell;
126 extern int wizard;
127 extern char fruit[], prbuf[], whoami[];
128 extern int orig_dsusp;
129 extern FILE *scoreboard;
130 extern int numscores;
131 extern char *Numname;
132 extern int allscore;
133
134 /*
135 * Function types
136 */
137
138 int md_chmod(const char *filename, int mode);
139 char *md_crypt(const char *key, const char *salt);
140 int md_dsuspchar(void);
141 int md_erasechar(void);
142 char *md_gethomedir(void);
143 char *md_getusername(void);
144 uid_t md_getuid(void);
145 char *md_getpass(char *prompt);
146 pid_t md_getpid(void);
147 char *md_getrealname(uid_t uid);
148 void md_init(void);
149 int md_killchar(void);
150 void md_normaluser(void);
151 void md_raw_standout(void);
152 void md_raw_standend(void);
153 int md_readchar(WINDOW *win);
154 int md_setdsuspchar(int c);
155 int md_shellescape(void);
156 void md_sleep(int s);
157 int md_suspchar(void);
158 int md_hasclreol(void);
159 int md_unlink(char *file);
160 int md_unlink_open_file(const char *file, FILE *inf);
161 void md_tstpsignal(void);
162 void md_tstphold(void);
163 void md_tstpresume(void);
164 void md_ignoreallsignals(void);
165 void md_onsignal_autosave(void);
166 void md_onsignal_exit(void);
167 void md_onsignal_default(void);
168 int md_issymlink(char *sp);
169 extern char *xcrypt(const char *key, const char *setting);
170