Ticket #35316: patch-getline.diff
File patch-getline.diff, 947 bytes (added by ryandesign (Ryan Carsten Schmidt), 12 years ago) |
---|
-
src/dumb/dumb_input.c
old new 79 79 /* Read one line, including the newline, into s. Safely avoids buffer 80 80 * overruns (but that's kind of pointless because there are several 81 81 * other places where I'm not so careful). */ 82 static void getline(char *s)82 static void frotz_getline(char *s) 83 83 { 84 84 int c; 85 85 char *p = s; … … 203 203 fputs(prompt, stdout); 204 204 else 205 205 dumb_show_prompt(show_cursor, (timeout ? "tTD" : ")>}")[type]); 206 getline(s);206 frotz_getline(s); 207 207 if ((s[0] != '\\') || ((s[1] != '\0') && !islower(s[1]))) { 208 208 /* Is not a command line. */ 209 209 translate_special_chars(s); … … 265 265 if (!*current_page) 266 266 break; 267 267 printf("HELP: Type <return> for more, or q <return> to stop: "); 268 getline(s);268 frotz_getline(s); 269 269 if (!strcmp(s, "q\n")) 270 270 break; 271 271 }