1 /* $OpenBSD: extern.h,v 1.6 2003/06/03 03:01:38 millert 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 extern char GAMES[]; 48 extern const char *file; 49 50 extern int clck, safe_planes, start_time, test_mode, makenoise; 51 52 extern FILE *filein, *fileout; 53 54 extern C_SCREEN screen, *sp; 55 56 extern LIST air, ground; 57 58 extern struct termios tty_start, tty_new; 59 60 extern DISPLACEMENT displacement[MAXDIR]; 61 62 int addplane(void); 63 void append(LIST *, PLANE *); 64 void check_adir(int, int, int); 65 void check_edge(int, int); 66 void check_edir(int, int, int); 67 void check_line(int, int, int, int); 68 void check_linepoint(int, int); 69 void check_point(int, int); 70 int checkdefs(void); 71 int compar(const void *, const void *); 72 void delete(LIST *, PLANE *); 73 int dir_deg(int); 74 int dir_no(char); 75 void done_screen(void); 76 void draw_all(void); 77 void draw_line(WINDOW *, int, int, int, int, const char *); 78 void erase_all(void); 79 int getAChar(void); 80 int getcommand(void); 81 int gettoken(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); 90 void loser(const PLANE *, const char *); 91 char name(const PLANE *); 92 int next_plane(void); 93 void noise(void); 94 int number(char); 95 int open_score_file(void); 96 void planewin(void); 97 int pop(void); 98 void push(int, int); 99 void quit(int); 100 int read_file(const char *); 101 void redraw(void); 102 void rezero(void); 103 void setup_screen(const C_SCREEN *); 104 int too_close(const PLANE *p1, const PLANE *p2, int); 105 void update(int); 106 int yyerror(const char *); 107 int yylex(void); 108 int yyparse(void); 109 const char *Left(char); 110 const char *Right(char); 111 const char *airport(char); 112 const char *beacon(char); 113 const char *benum(char); 114 const char *circle(char); 115 const char *climb(char); 116 const char *command(PLANE *); 117 const char *default_game(void); 118 const char *delayb(char); 119 const char *descend(char); 120 const char *ex_it(char); 121 PLANE *findplane(int); 122 const char *ignore(char); 123 const char *left(char); 124 const char *mark(char); 125 PLANE *newplane(void); 126 const char *okay_game(const char *); 127 const char *rel_dir(char); 128 const char *right(char); 129 const char *setalt(char); 130 const char *setplane(char); 131 const char *setrelalt(char); 132 const char *timestr(int); 133 const char *to_dir(char); 134 const char *turn(char); 135 const char *unmark(char); 136