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  
    7979/* Read one line, including the newline, into s.  Safely avoids buffer
    8080 * overruns (but that's kind of pointless because there are several
    8181 * other places where I'm not so careful).  */
    82 static void getline(char *s)
     82static void frotz_getline(char *s)
    8383{
    8484  int c;
    8585  char *p = s;
     
    203203      fputs(prompt, stdout);
    204204    else
    205205      dumb_show_prompt(show_cursor, (timeout ? "tTD" : ")>}")[type]);
    206     getline(s);
     206    frotz_getline(s);
    207207    if ((s[0] != '\\') || ((s[1] != '\0') && !islower(s[1]))) {
    208208      /* Is not a command line.  */
    209209      translate_special_chars(s);
     
    265265          if (!*current_page)
    266266            break;
    267267          printf("HELP: Type <return> for more, or q <return> to stop: ");
    268           getline(s);
     268          frotz_getline(s);
    269269          if (!strcmp(s, "q\n"))
    270270            break;
    271271        }