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

Diff for /src/usr.bin/mail/tty.c between version 1.13 and 1.14

version 1.13, 2001/11/20 20:50:00 version 1.14, 2001/11/21 15:26:39
Line 36 
Line 36 
   
 #ifndef lint  #ifndef lint
 #if 0  #if 0
 static char sccsid[] = "@(#)tty.c       8.2 (Berkeley) 4/20/95";  static const char sccsid[] = "@(#)tty.c 8.2 (Berkeley) 4/20/95";
 #else  #else
 static char rcsid[] = "$OpenBSD$";  static const char rcsid[] = "$OpenBSD$";
 #endif  #endif
 #endif /* not lint */  #endif /* not lint */
   
Line 63 
Line 63 
 /*  /*
  * Read all relevant header fields.   * Read all relevant header fields.
  */   */
   
 int  int
 grabh(hp, gflags)  grabh(struct header *hp, int gflags)
         struct header *hp;  
         int gflags;  
 {  {
         struct termios ttybuf;          struct termios ttybuf;
 #ifndef TIOCSTI  #ifndef TIOCSTI
Line 120 
Line 117 
 #endif  #endif
         if (gflags & GTO) {          if (gflags & GTO) {
 #ifndef TIOCSTI  #ifndef TIOCSTI
                 if (!ttyset && hp->h_to != NIL)                  if (!ttyset && hp->h_to != NULL)
                         ttyset++, tcsetattr(fileno(stdin), TCSADRAIN, &ttybuf);                          ttyset++, tcsetattr(fileno(stdin), TCSADRAIN, &ttybuf);
 #endif  #endif
                 s = readtty("To: ", detract(hp->h_to, 0));                  s = readtty("To: ", detract(hp->h_to, 0));
Line 140 
Line 137 
         }          }
         if (gflags & GCC) {          if (gflags & GCC) {
 #ifndef TIOCSTI  #ifndef TIOCSTI
                 if (!ttyset && hp->h_cc != NIL)                  if (!ttyset && hp->h_cc != NULL)
                         ttyset++, tcsetattr(fileno(stdin), TCSADRAIN, &ttybuf);                          ttyset++, tcsetattr(fileno(stdin), TCSADRAIN, &ttybuf);
 #endif  #endif
                 s = readtty("Cc: ", detract(hp->h_cc, 0));                  s = readtty("Cc: ", detract(hp->h_cc, 0));
Line 150 
Line 147 
         }          }
         if (gflags & GBCC) {          if (gflags & GBCC) {
 #ifndef TIOCSTI  #ifndef TIOCSTI
                 if (!ttyset && hp->h_bcc != NIL)                  if (!ttyset && hp->h_bcc != NULL)
                         ttyset++, tcsetattr(fileno(stdin), TCSADRAIN, &ttybuf);                          ttyset++, tcsetattr(fileno(stdin), TCSADRAIN, &ttybuf);
 #endif  #endif
                 s = readtty("Bcc: ", detract(hp->h_bcc, 0));                  s = readtty("Bcc: ", detract(hp->h_bcc, 0));
Line 187 
Line 184 
  * be read.   * be read.
  *   *
  */   */
   
 char *  char *
 readtty(pr, src)  readtty(char *pr, char *src)
         char pr[], src[];  
 {  {
         struct sigaction act, oact;          struct sigaction act, oact;
         sigset_t oset;  
         char ch, canonb[BUFSIZ];          char ch, canonb[BUFSIZ];
         char *cp, *cp2;          char *cp, *cp2;
           sigset_t oset;
         int c;          int c;
   
         fputs(pr, stdout);          fputs(pr, stdout);
Line 316 
Line 311 
  * Receipt continuation.   * Receipt continuation.
  */   */
 void  void
 ttystop(s)  ttystop(int s)
         int s;  
 {  {
         struct sigaction act, oact;          struct sigaction act, oact;
         sigset_t nset;          sigset_t nset;
Line 344 
Line 338 
   
 /*ARGSUSED*/  /*ARGSUSED*/
 void  void
 ttyint(s)  ttyint(int s)
         int s;  
 {  {
   
         ttysignal = s;          ttysignal = s;

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14