extern.h revision 1.10 1 /* $NetBSD: extern.h,v 1.10 2003/08/07 09:36:53 agc 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 __P((void));
62 void append __P((LIST *, PLANE *));
63 void check_adir __P((int, int, int));
64 void check_edge __P((int, int));
65 void check_edir __P((int, int, int));
66 void check_line __P((int, int, int, int));
67 void check_linepoint __P((int, int));
68 void check_point __P((int, int));
69 int checkdefs __P((void));
70 int compar __P((const void *, const void *));
71 void delete __P((LIST *, PLANE *));
72 int dir_deg __P((int));
73 int dir_no __P((char));
74 void done_screen __P((void));
75 void draw_all __P((void));
76 void draw_line __P((WINDOW *, int, int, int, int, const char *));
77 void erase_all __P((void));
78 int getAChar __P((void));
79 int getcommand __P((void));
80 int gettoken __P((void));
81 void init_gr __P((void));
82 void ioaddstr __P((int, const char *));
83 void ioclrtobot __P((void));
84 void ioclrtoeol __P((int));
85 void ioerror __P((int, int, const char *));
86 void iomove __P((int));
87 int list_games __P((void));
88 int log_score __P((int));
89 void log_score_quit __P((int)) __attribute__((__noreturn__));
90 void loser __P((const PLANE *, const char *)) __attribute__((__noreturn__));
91 int main __P((int, char *[]));
92 char name __P((const PLANE *));
93 int next_plane __P((void));
94 void noise __P((void));
95 int number __P((char));
96 void open_score_file __P((void));
97 void planewin __P((void));
98 int pop __P((void));
99 void push __P((int, int));
100 void quit __P((int));
101 int read_file __P((const char *));
102 void redraw __P((void));
103 void rezero __P((void));
104 void setup_screen __P((const C_SCREEN *));
105 int too_close __P((const PLANE *p1, const PLANE *p2, int));
106 void update __P((int));
107 int yyerror __P((const char *));
108 int yylex __P((void));
109 #ifndef YYEMPTY
110 int yyparse __P((void));
111 #endif
112 const char *Left __P((char));
113 const char *Right __P((char));
114 const char *airport __P((char));
115 const char *beacon __P((char));
116 const char *benum __P((char));
117 const char *circle __P((char));
118 const char *climb __P((char));
119 const char *command __P((const PLANE *));
120 const char *default_game __P((void));
121 const char *delayb __P((char));
122 const char *descend __P((char));
123 const char *ex_it __P((char));
124 PLANE *findplane __P((int));
125 const char *ignore __P((char));
126 const char *left __P((char));
127 const char *mark __P((char));
128 PLANE *newplane __P((void));
129 const char *okay_game __P((const char *));
130 const char *rel_dir __P((char));
131 const char *right __P((char));
132 const char *setalt __P((char));
133 const char *setplane __P((char));
134 const char *setrelalt __P((char));
135 const char *timestr __P((int));
136 const char *to_dir __P((char));
137 const char *turn __P((char));
138 const char *unmark __P((char));
139