[BACK]Return to tip.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tip

Diff for /src/usr.bin/tip/Attic/tip.c between version 1.5 and 1.6

version 1.5, 1997/04/20 23:29:33 version 1.6, 1997/08/22 22:42:07
Line 300 
Line 300 
  *  in from the terminal.  Handles signals & allows use of   *  in from the terminal.  Handles signals & allows use of
  *  normal erase and kill characters.   *  normal erase and kill characters.
  */   */
 prompt(s, p)  prompt(s, p, sz)
         char *s;          char *s;
         register char *p;          register char *p;
           size_t sz;
 {  {
         register int c;          register int c;
         register char *b = p;          register char *b = p;
Line 314 
Line 315 
         unraw();          unraw();
         printf("%s", s);          printf("%s", s);
         if (setjmp(promptbuf) == 0)          if (setjmp(promptbuf) == 0)
                 while ((c = getchar()) != EOF && (*p = c) != '\n')                  while ((c = getchar()) != EOF && (*p = c) != '\n' && --sz > 0)
                         p++;                          p++;
         *p = '\0';          *p = '\0';
   

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6