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

Diff for /src/usr.bin/tip/Attic/cmds.c between version 1.28 and 1.29

version 1.28, 2009/10/27 23:59:44 version 1.29, 2009/12/12 13:38:09
Line 144 
Line 144 
         parwrite(FD, buf, size(buf));          parwrite(FD, buf, size(buf));
         quit = 0;          quit = 0;
         kill(tipout_pid, SIGIOT);          kill(tipout_pid, SIGIOT);
         read(repdes[0], (char *)&ccc, 1);  /* Wait until read process stops */          read(tipout_fd, (char *)&ccc, 1);  /* Wait until read process stops */
   
         /*          /*
          * finish command           * finish command
Line 189 
Line 189 
         if (boolean(value(VERBOSE)))          if (boolean(value(VERBOSE)))
                 prtime(" lines transferred in ", time(0)-start);                  prtime(" lines transferred in ", time(0)-start);
         tcsetattr(0, TCSAFLUSH, &term);          tcsetattr(0, TCSAFLUSH, &term);
         write(fildes[1], (char *)&ccc, 1);          write(tipout_fd, (char *)&ccc, 1);
         signal(SIGINT, f);          signal(SIGINT, f);
         close(fd);          close(fd);
 }  }
Line 301 
Line 301 
         stop = 0;          stop = 0;
         f = signal(SIGINT, stopsnd);          f = signal(SIGINT, stopsnd);
         tcsetattr(0, TCSAFLUSH, &defchars);          tcsetattr(0, TCSAFLUSH, &defchars);
         read(repdes[0], (char *)&ccc, 1);          read(tipout_fd, (char *)&ccc, 1);
         if (command != NULL) {          if (command != NULL) {
                 for (pc = command; *pc; pc++)                  for (pc = command; *pc; pc++)
                         send(*pc);                          send(*pc);
Line 378 
Line 378 
                 else                  else
                         prtime(" lines transferred in ", stop_t-start_t);                          prtime(" lines transferred in ", stop_t-start_t);
         }          }
         write(fildes[1], (char *)&ccc, 1);          write(tipout_fd, (char *)&ccc, 1);
         tcsetattr(0, TCSAFLUSH, &term);          tcsetattr(0, TCSAFLUSH, &term);
 }  }
   
Line 476 
Line 476 
         signal(SIGINT, SIG_IGN);          signal(SIGINT, SIG_IGN);
         signal(SIGQUIT, SIG_IGN);          signal(SIGQUIT, SIG_IGN);
         tcsetattr(0, TCSAFLUSH, &defchars);          tcsetattr(0, TCSAFLUSH, &defchars);
         read(repdes[0], (char *)&ccc, 1);          read(tipout_fd, (char *)&ccc, 1);
         /*          /*
          * Set up file descriptors in the child and           * Set up file descriptors in the child and
          *  let it go...           *  let it go...
Line 501 
Line 501 
         }          }
         if (boolean(value(VERBOSE)))          if (boolean(value(VERBOSE)))
                 prtime("away for ", time(0)-start);                  prtime("away for ", time(0)-start);
         write(fildes[1], (char *)&ccc, 1);          write(tipout_fd, (char *)&ccc, 1);
         tcsetattr(0, TCSAFLUSH, &term);          tcsetattr(0, TCSAFLUSH, &term);
         signal(SIGINT, SIG_DFL);          signal(SIGINT, SIG_DFL);
         signal(SIGQUIT, SIG_DFL);          signal(SIGQUIT, SIG_DFL);
Line 529 
Line 529 
         signal(SIGINT, SIG_IGN);          signal(SIGINT, SIG_IGN);
         signal(SIGQUIT, SIG_IGN);          signal(SIGQUIT, SIG_IGN);
         tcsetattr(0, TCSAFLUSH, &defchars);          tcsetattr(0, TCSAFLUSH, &defchars);
         read(repdes[0], (char *)&ccc, 1);          read(tipout_fd, (char *)&ccc, 1);
         /*          /*
          * Set up file descriptors in the child and           * Set up file descriptors in the child and
          *  let it go...           *  let it go...
Line 552 
Line 552 
         }          }
         if (boolean(value(VERBOSE)))          if (boolean(value(VERBOSE)))
                 prtime("away for ", time(0)-start);                  prtime("away for ", time(0)-start);
         write(fildes[1], (char *)&ccc, 1);          write(tipout_fd, (char *)&ccc, 1);
         tcsetattr(0, TCSAFLUSH, &term);          tcsetattr(0, TCSAFLUSH, &term);
         signal(SIGINT, SIG_DFL);          signal(SIGINT, SIG_DFL);
         signal(SIGQUIT, SIG_DFL);          signal(SIGQUIT, SIG_DFL);
Line 609 
Line 609 
          */           */
         kill(tipout_pid, SIGEMT);          kill(tipout_pid, SIGEMT);
         if (boolean(value(SCRIPT)))          if (boolean(value(SCRIPT)))
                 write(fildes[1], value(RECORD), size(value(RECORD)));                  write(tipout_fd, value(RECORD), size(value(RECORD)));
         write(fildes[1], "\n", 1);          write(tipout_fd, "\n", 1);
         /*          /*
          * wait for TIPOUT to finish           * wait for TIPOUT to finish
          */           */
         read(repdes[0], &c, 1);          read(tipout_fd, &c, 1);
         if (c == 'n')          if (c == 'n')
                 printf("can't create %s\r\n", value(RECORD));                  printf("can't create %s\r\n", value(RECORD));
 }  }

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29