extern.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. /* $NetBSD: extern.h,v 1.10 2004/01/27 20:30:28 jsm Exp $ */
  2. /*
  3. * Copyright (c) 1997 Christos Zoulas. All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. * 1. Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * 2. Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. * 3. All advertising materials mentioning features or use of this software
  14. * must display the following acknowledgement:
  15. * This product includes software developed by Christos Zoulas.
  16. * 4. The name of the author may not be used to endorse or promote products
  17. * derived from this software without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  20. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  21. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  22. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  23. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  24. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  25. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  26. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  27. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  28. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29. */
  30. #include <string.h>
  31. /* crc.c */
  32. void crc_start(void);
  33. unsigned long crc(const char *, int);
  34. /* done.c */
  35. int score(void);
  36. void done(int) __attribute__((__noreturn__));
  37. void die(int);
  38. /* init.c */
  39. void init(void);
  40. char *decr(int, int, int, int, int);
  41. void linkdata(void);
  42. void trapdel(int);
  43. void startup(void);
  44. /* io.c */
  45. void getin(char **, char **);
  46. int yes(int, int, int);
  47. int yesm(int, int, int);
  48. int next(void);
  49. void rdata(void);
  50. int rnum(void);
  51. void rdesc(int);
  52. void rtrav(void);
  53. #ifdef DEBUG
  54. void twrite(int);
  55. #endif
  56. void rvoc(void);
  57. void rlocs(void);
  58. void rdflt(void);
  59. void rliq(void);
  60. void rhints(void);
  61. void rspeak(int);
  62. void mspeak(int);
  63. struct text;
  64. void speak(const struct text *);
  65. void pspeak(int, int);
  66. /* save.c */
  67. int save(const char *);
  68. int restore(const char *);
  69. /* subr.c */
  70. int toting(int);
  71. int here(int);
  72. int at(int);
  73. int liq2(int);
  74. int liq(void);
  75. int liqloc(int);
  76. int bitset(int, int);
  77. int forced(int);
  78. int dark(void);
  79. int pct(int);
  80. int fdwarf(void);
  81. int march(void);
  82. int mback(void);
  83. int specials(void);
  84. int trbridge(void);
  85. void badmove(void);
  86. void bug(int) __attribute__((__noreturn__));
  87. void checkhints(void);
  88. int trsay(void);
  89. int trtake(void);
  90. int dropper(void);
  91. int trdrop(void);
  92. int tropen(void);
  93. int trkill(void);
  94. int trtoss(void);
  95. int trfeed(void);
  96. int trfill(void);
  97. void closing(void);
  98. void caveclose(void);
  99. /* vocab.c */
  100. void dstroy(int);
  101. void juggle(int);
  102. void move(int, int);
  103. int put(int, int, int);
  104. void carry(int, int);
  105. void drop(int, int);
  106. int vocab(const char *, int, int);
  107. /* These three used to be functions in vocab.c */
  108. #define copystr(src, dest) strcpy((dest), (src))
  109. #define weq(str1, str2) (!strncmp((str1), (str2), 5))
  110. #define length(str) (strlen((str)) + 1)
  111. void prht(void);
  112. /* wizard.c */
  113. void datime(int *, int *);
  114. void poof(void);
  115. int Start(void);
  116. int wizard(void);
  117. void ciao(void);
  118. int ran(int);