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

Diff for /src/usr.bin/tset/Attic/term.c between version 1.3 and 1.4

version 1.3, 1997/01/17 07:13:44 version 1.4, 1997/07/25 22:13:24
Line 48 
Line 48 
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
   #include <err.h>
 #include "extern.h"  #include "extern.h"
   
 char    tbuf[1024];                     /* Termcap entry. */  char    tbuf[1024];                     /* Termcap entry. */
Line 113 
Line 114 
   
         /* Find the termcap entry.  If it doesn't exist, ask the user. */          /* Find the termcap entry.  If it doesn't exist, ask the user. */
         while ((rval = tgetent(tbuf, ttype)) == 0) {          while ((rval = tgetent(tbuf, ttype)) == 0) {
                 (void)fprintf(stderr,                  warnx("terminal type %s is unknown", ttype);
                     "tset: terminal type %s is unknown\n", ttype);  
                 ttype = askuser(NULL);                  ttype = askuser(NULL);
         }          }
         if (rval == -1)          if (rval == -1)
                 err("termcap: %s", strerror(errno ? errno : ENOENT));                  warnx("termcap: %s", strerror(errno ? errno : ENOENT));
         *tcapbufp = tbuf;          *tcapbufp = tbuf;
         return (ttype);          return (ttype);
 }  }
Line 132 
Line 132 
         char *p;          char *p;
   
         /* We can get recalled; if so, don't continue uselessly. */          /* We can get recalled; if so, don't continue uselessly. */
         if (feof(stdin) || ferror(stdin)) {          if (feof(stdin) || ferror(stdin))
                 (void)fprintf(stderr, "\n");  
                 exit(1);                  exit(1);
         }  
         for (;;) {          for (;;) {
                 if (dflt)                  if (dflt)
                         (void)fprintf(stderr, "Terminal type? [%s] ", dflt);                          (void)fprintf(stderr, "Terminal type? [%s] ", dflt);

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4