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

Diff for /src/usr.bin/msgs/Attic/msgs.c between version 1.9 and 1.10

version 1.9, 1997/04/28 05:48:32 version 1.10, 1997/04/28 06:03:51
Line 69 
Line 69 
  *      <num>   print message number <num>   *      <num>   print message number <num>
  */   */
   
 #define V7              /* will look for TERM in the environment */  
 #define OBJECT          /* will object to messages without Subjects */  #define OBJECT          /* will object to messages without Subjects */
 #define REJECT  /* will reject messages without Subjects  #define REJECT  /* will reject messages without Subjects
                            (OBJECT must be defined also) */                             (OBJECT must be defined also) */
Line 445 
Line 444 
                 fflush(msgsrc);                  fflush(msgsrc);
         }          }
   
 #ifdef V7  
         if (totty) {          if (totty) {
                 struct winsize win;                  struct winsize win;
                 if (ioctl(fileno(stdout), TIOCGWINSZ, &win) != -1)                  if (ioctl(fileno(stdout), TIOCGWINSZ, &win) != -1)
                         Lpp = win.ws_row;                          Lpp = win.ws_row;
                 if (Lpp <= 0) {                  if (Lpp <= 0) {
                         if (tgetent(inbuf, getenv("TERM")) <= 0                          char *ttype = getenv("TERM");
                             || (Lpp = tgetnum("li")) <= 0) {  
                           if (ttype != (char *)NULL) {
                                   if (tgetent(NULL, ttype) <= 0
                                       || (Lpp = tgetnum("li")) <= 0) {
                                           Lpp = NLINES;
                                   }
                           } else
                                 Lpp = NLINES;                                  Lpp = NLINES;
                         }  
                 }                  }
         }          }
 #endif  
         Lpp -= 6;       /* for headers, etc. */          Lpp -= 6;       /* for headers, etc. */
   
         already = NO;          already = NO;

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10