extern.h revision 1.11 1 /* $NetBSD: extern.h,v 1.11 2004/01/27 20:30:28 jsm Exp $ */
2
3 /*-
4 * Copyright (c) 1990, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * Ed James.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. Neither the name of the University nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)extern.h 8.1 (Berkeley) 5/31/93
35 */
36
37 /*
38 * Copyright (c) 1987 by Ed James, UC Berkeley. All rights reserved.
39 *
40 * Copy permission is hereby granted provided that this notice is
41 * retained on all partial or complete copies.
42 *
43 * For more info on this and all of my stuff, mail edjames (at) berkeley.edu.
44 */
45
46 extern char GAMES[];
47 extern const char *file;
48
49 extern int clck, safe_planes, start_time, test_mode;
50
51 extern FILE *filein, *fileout;
52
53 extern C_SCREEN screen, *sp;
54
55 extern LIST air, ground;
56
57 extern struct termios tty_start, tty_new;
58
59 extern DISPLACEMENT displacement[MAXDIR];
60
61 int addplane(void);
62 void append(LIST *, PLANE *);
63 void check_adir(int, int, int);
64 void check_edge(int, int);
65 void check_edir(int, int, int);
66 void check_line(int, int, int, int);
67 void check_linepoint(int, int);
68 void check_point(int, int);
69 int checkdefs(void);
70 int compar(const void *, const void *);
71 void delete(LIST *, PLANE *);
72 int dir_deg(int);
73 int dir_no(char);
74 void done_screen(void);
75 void draw_all(void);
76 void draw_line(WINDOW *, int, int, int, int, const char *);
77 void erase_all(void);
78 int getAChar(void);
79 int getcommand(void);
80 int gettoken(void);
81 void init_gr(void);
82 void ioaddstr(int, const char *);
83 void ioclrtobot(void);
84 void ioclrtoeol(int);
85 void ioerror(int, int, const char *);
86 void iomove(int);
87 int list_games(void);
88 int log_score(int);
89 void log_score_quit(int) __attribute__((__noreturn__));
90 void loser(const PLANE *, const char *) __attribute__((__noreturn__));
91 int main(int, char *[]);
92 char name(const PLANE *);
93 int next_plane(void);
94 void noise(void);
95 int number(char);
96 void open_score_file(void);
97 void planewin(void);
98 int pop(void);
99 void push(int, int);
100 void quit(int);
101 int read_file(const char *);
102 void redraw(void);
103 void rezero(void);
104 void setup_screen(const C_SCREEN *);
105 int too_close(const PLANE *p1, const PLANE *p2, int);
106 void update(int);
107 int yyerror(const char *);
108 int yylex(void);
109 #ifndef YYEMPTY
110 int yyparse(void);
111 #endif
112 const char *Left(char);
113 const char *Right(char);
114 const char *airport(char);
115 const char *beacon(char);
116 const char *benum(char);
117 const char *circle(char);
118 const char *climb(char);
119 const char *command(const PLANE *);
120 const char *default_game(void);
121 const char *delayb(char);
122 const char *descend(char);
123 const char *ex_it(char);
124 PLANE *findplane(int);
125 const char *ignore(char);
126 const char *left(char);
127 const char *mark(char);
128 PLANE *newplane(void);
129 const char *okay_game(const char *);
130 const char *rel_dir(char);
131 const char *right(char);
132 const char *setalt(char);
133 const char *setplane(char);
134 const char *setrelalt(char);
135 const char *timestr(int);
136 const char *to_dir(char);
137 const char *turn(char);
138 const char *unmark(char);
139