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

Diff for /src/usr.bin/ssh/scp.c between version 1.15 and 1.16

version 1.15, 1999/11/12 17:10:51 version 1.16, 1999/11/17 09:20:17
Line 1112 
Line 1112 
         errno = save_errno;          errno = save_errno;
 }  }
   
   int
   foregroundproc()
   {
           static pid_t pgrp = -1;
           int ctty_pgrp;
   
           if (pgrp == -1)
                   pgrp = getpgrp();
   
           return((ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) != -1 &&
               ctty_pgrp == pgrp));
   }
   
 void  void
 progressmeter(int flag)  progressmeter(int flag)
 {  {
Line 1129 
Line 1142 
                 lastupdate = start;                  lastupdate = start;
                 lastsize = 0;                  lastsize = 0;
         }          }
           if (foregroundproc() == 0)
                   return;
   
         (void)gettimeofday(&now, (struct timezone *)0);          (void)gettimeofday(&now, (struct timezone *)0);
         cursize = statbytes;          cursize = statbytes;
         if (totalbytes != 0) {          if (totalbytes != 0) {
Line 1145 
Line 1161 
         if (barlength > 0) {          if (barlength > 0) {
                 i = barlength * ratio / 100;                  i = barlength * ratio / 100;
                 snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),                  snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
                 "|%.*s%*s|", i,                      "|%.*s%*s|", i,
 "*****************************************************************************"  "*****************************************************************************"
 "*****************************************************************************",  "*****************************************************************************",
                  barlength - i, "");                      barlength - i, "");
         }          }
   
         i = 0;          i = 0;

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16