extern.h 4.5 KB

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