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