Annotation of early-roguelike/rogue5/extern.h, Revision 1.1.1.1
1.1 rubenllo 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: #elif defined(__CYGWIN__)
48: #define HAVE_SYS_TYPES_H 1
49: #define HAVE_PWD_H 1
50: #define HAVE_PWD_H 1
51: #define HAVE_SYS_UTSNAME_H 1
52: #define HAVE_ARPA_INET_H 1
53: #define HAVE_UNISTD_H 1
54: #define HAVE_TERMIOS_H 1
55: #define HAVE_NCURSES_TERM_H 1
56: #define HAVE_ESCDELAY
57: #define HAVE_SETGID 1
58: #define HAVE_GETGID 1
59: #define HAVE_SETUID 1
60: #define HAVE_GETUID 1
61: #define HAVE_GETPASS 1
62: #define HAVE_GETPWUID 1
63: #define HAVE_WORKING_FORK 1
64: #define HAVE_ALARM 1
65: #define HAVE_SPAWNL 1
66: #define HAVE__SPAWNL 1
67: #define HAVE_ERASECHAR 1
68: #define HAVE_KILLCHAR 1
69: #else /* POSIX */
70: #define HAVE_SYS_TYPES_H 1
71: #define HAVE_PWD_H 1
72: #define HAVE_PWD_H 1
73: #define HAVE_SYS_UTSNAME_H 1
74: #define HAVE_ARPA_INET_H 1
75: #define HAVE_UNISTD_H 1
76: #define HAVE_TERMIOS_H 1
77: #define HAVE_TERM_H 1
78: #define HAVE_SETGID 1
79: #define HAVE_GETGID 1
80: #define HAVE_SETUID 1
81: #define HAVE_GETUID 1
82: #define HAVE_SETREUID 1
83: #define HAVE_SETREGID 1
84: #define HAVE_GETPASS 1
85: #define HAVE_GETPWUID 1
86: #define HAVE_WORKING_FORK 1
87: #define HAVE_ERASECHAR 1
88: #define HAVE_KILLCHAR 1
89: #ifndef _AIX
90: #define HAVE_GETLOADAVG 1
91: #endif
92: #define HAVE_ALARM 1
93: #endif
94:
95: #ifdef __DJGPP__
96: #undef HAVE_GETPWUID /* DJGPP's limited version doesn't even work as documented */
97: #endif
98:
99: /*
100: * Don't change the constants, since they are used for sizes in many
101: * places in the program.
102: */
103:
104: #include <stdlib.h>
105:
106: #undef SIGTSTP
107:
108: #define MAXSTR 1024 /* maximum length of strings */
109: #define MAXLINES 32 /* maximum number of screen lines used */
110: #define MAXCOLS 80 /* maximum number of screen columns used */
111:
112: #define RN (((seed = seed*11109+13849) >> 16) & 0xffff)
113: #ifdef CTRL
114: #undef CTRL
115: #endif
116: #define CTRL(c) (c & 037)
117:
118: /*
119: * Now all the global variables
120: */
121:
122: extern int got_ltc, in_shell;
123: extern int wizard;
124: extern char fruit[], prbuf[], whoami[];
125: extern int orig_dsusp;
126: extern FILE *scoreboard;
127: extern FILE *logfi;
128: extern int numscores;
129: extern char *Numname;
130: extern int allscore;
131: extern int use_savedir;
132:
133: /*
134: * Function types
135: */
136:
137: int md_chmod(const char *filename, int mode);
138: char *md_crypt(const char *key, const char *salt);
139: int md_dsuspchar(void);
140: int md_erasechar(void);
141: char *md_gethomedir(void);
142: char *md_getusername(void);
143: uid_t md_getuid(void);
144: char *md_getpass(char *prompt);
145: char *md_getrealname(uid_t uid);
146: void md_init(void);
147: int md_killchar(void);
148: void md_normaluser(void);
149: void md_raw_standout(void);
150: void md_raw_standend(void);
151: int md_readchar(WINDOW *win);
152: int md_setdsuspchar(int c);
153: int md_shellescape(void);
154: void md_sleep(int s);
155: int md_suspchar(void);
156: int md_hasclreol(void);
157: int md_unlink(char *file);
158: int md_unlink_open_file(const char *file, FILE *inf);
159: void md_tstpsignal(void);
160: void md_tstphold(void);
161: void md_tstpresume(void);
162: void md_ignoreallsignals(void);
163: void md_onsignal_autosave(void);
164: void md_onsignal_exit(void);
165: void md_onsignal_default(void);
166: int md_issymlink(char *sp);
167: unsigned int md_random_seed(void);
168: extern char *xcrypt(const char *key, const char *setting);
169:
CVSweb