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