OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

202 lines
4.8 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../bsd-games/glibc2_10.patch
  5. # Copyright (C) 2010 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. --- ./boggle/boggle/bog.c
  17. +++ ./boggle/boggle/bog.c
  18. @@ -336,7 +336,7 @@
  19. }
  20. while (1) {
  21. - if (getline(buf) == NULL) {
  22. + if (get_line(buf) == NULL) {
  23. if (feof(stdin))
  24. clearerr(stdin);
  25. break;
  26. --- ./boggle/boggle/extern.h
  27. +++ ./boggle/boggle/extern.h
  28. @@ -43,7 +43,7 @@
  29. long dictseek(FILE *, long, int);
  30. void findword(void);
  31. void flushin(FILE *);
  32. -char *getline(char *);
  33. +char *get_line(char *);
  34. void getword(char *);
  35. int help(void);
  36. int inputch(void);
  37. --- ./boggle/boggle/mach.c
  38. +++ ./boggle/boggle/mach.c
  39. @@ -168,7 +168,7 @@
  40. * - doesn't accept words longer than MAXWORDLEN or containing caps
  41. */
  42. char *
  43. -getline(q)
  44. +get_line(q)
  45. char *q;
  46. {
  47. int ch, done;
  48. --- ./cribbage/cribbage.h
  49. +++ ./cribbage/cribbage.h
  50. @@ -77,7 +77,7 @@
  51. int fifteens(const CARD [], int);
  52. void game(void);
  53. void gamescore(void);
  54. -char *getline(void);
  55. +char *get_line(void);
  56. int getuchar(void);
  57. int incard(CARD *);
  58. int infrom(const CARD [], int, const char *);
  59. --- ./cribbage/crib.c
  60. +++ ./cribbage/crib.c
  61. @@ -221,7 +221,7 @@
  62. if (!rflag) { /* player cuts deck */
  63. msg(quiet ? "Cut for crib? " :
  64. "Cut to see whose crib it is -- low card wins? ");
  65. - getline();
  66. + get_line();
  67. }
  68. i = (rand() >> 4) % CARDS; /* random cut */
  69. do { /* comp cuts deck */
  70. @@ -397,7 +397,7 @@
  71. if (!rflag) { /* random cut */
  72. msg(quiet ? "Cut the deck? " :
  73. "How many cards down do you wish to cut the deck? ");
  74. - getline();
  75. + get_line();
  76. }
  77. i = (rand() >> 4) % (CARDS - pos);
  78. turnover = deck[i + pos];
  79. --- ./cribbage/io.c
  80. +++ ./cribbage/io.c
  81. @@ -245,7 +245,7 @@
  82. retval = FALSE;
  83. rnk = sut = EMPTY;
  84. - if (!(line = getline()))
  85. + if (!(line = get_line()))
  86. goto gotit;
  87. p = p1 = line;
  88. while (*p1 != ' ' && *p1 != '\0')
  89. @@ -346,7 +346,7 @@
  90. for (sum = 0;;) {
  91. msg(prompt);
  92. - if (!(p = getline()) || *p == '\0') {
  93. + if (!(p = get_line()) || *p == '\0') {
  94. msg(quiet ? "Not a number" :
  95. "That doesn't look like a number");
  96. continue;
  97. @@ -528,12 +528,12 @@
  98. }
  99. /*
  100. - * getline:
  101. + * get_line:
  102. * Reads the next line up to '\n' or EOF. Multiple spaces are
  103. * compressed to one space; a space is inserted before a ','
  104. */
  105. char *
  106. -getline()
  107. +get_line()
  108. {
  109. char *sp;
  110. int c, oy, ox;
  111. --- ./gomoku/bdisp.c
  112. +++ ./gomoku/bdisp.c
  113. @@ -241,7 +241,7 @@
  114. }
  115. int
  116. -getline(buf, size)
  117. +get_line(buf, size)
  118. char *buf;
  119. int size;
  120. {
  121. --- ./gomoku/gomoku.h
  122. +++ ./gomoku/gomoku.h
  123. @@ -263,7 +263,7 @@
  124. void bdinit(struct spotstr *);
  125. void init_overlap(void);
  126. -int getline(char *, int);
  127. +int get_line(char *, int);
  128. void ask(const char *);
  129. void dislog(const char *);
  130. void bdump(FILE *);
  131. --- ./gomoku/main.c
  132. +++ ./gomoku/main.c
  133. @@ -155,7 +155,7 @@
  134. if (inputfp == NULL && test == 0) {
  135. for (;;) {
  136. ask("black or white? ");
  137. - getline(buf, sizeof(buf));
  138. + get_line(buf, sizeof(buf));
  139. if (buf[0] == 'b' || buf[0] == 'B') {
  140. color = BLACK;
  141. break;
  142. @@ -172,7 +172,7 @@
  143. }
  144. } else {
  145. setbuf(stdout, 0);
  146. - getline(buf, sizeof(buf));
  147. + get_line(buf, sizeof(buf));
  148. if (strcmp(buf, "black") == 0)
  149. color = BLACK;
  150. else if (strcmp(buf, "white") == 0)
  151. @@ -244,7 +244,7 @@
  152. getinput:
  153. if (interactive)
  154. ask("move? ");
  155. - if (!getline(buf, sizeof(buf))) {
  156. + if (!get_line(buf, sizeof(buf))) {
  157. curmove = RESIGN;
  158. break;
  159. }
  160. @@ -256,7 +256,7 @@
  161. FILE *fp;
  162. ask("save file name? ");
  163. - (void)getline(buf, sizeof(buf));
  164. + (void)get_line(buf, sizeof(buf));
  165. if ((fp = fopen(buf, "w")) == NULL) {
  166. glog("cannot create save file");
  167. goto getinput;
  168. @@ -309,14 +309,14 @@
  169. if (i != RESIGN) {
  170. replay:
  171. ask("replay? ");
  172. - if (getline(buf, sizeof(buf)) &&
  173. + if (get_line(buf, sizeof(buf)) &&
  174. (buf[0] == 'y' || buf[0] == 'Y'))
  175. goto again;
  176. if (strcmp(buf, "save") == 0) {
  177. FILE *fp;
  178. ask("save file name? ");
  179. - (void)getline(buf, sizeof(buf));
  180. + (void)get_line(buf, sizeof(buf));
  181. if ((fp = fopen(buf, "w")) == NULL) {
  182. glog("cannot create save file");
  183. goto replay;
  184. @@ -367,7 +367,7 @@
  185. quit();
  186. top:
  187. ask("cmd? ");
  188. - if (!getline(fmtbuf, sizeof(fmtbuf)))
  189. + if (!get_line(fmtbuf, sizeof(fmtbuf)))
  190. quit();
  191. switch (*fmtbuf) {
  192. case '\0':