[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.12 and 1.13

version 1.12, 1999/10/05 12:17:05 version 1.13, 1999/10/08 01:25:20
Line 1130 
Line 1130 
                 lastsize = 0;                  lastsize = 0;
         }          }
         (void)gettimeofday(&now, (struct timezone *)0);          (void)gettimeofday(&now, (struct timezone *)0);
         if (totalbytes <= 0)  
                 return;  
         cursize = statbytes;          cursize = statbytes;
         ratio = cursize * 100 / totalbytes;          if (totalbytes != 0) {
         ratio = MAX(ratio, 0);                  ratio = cursize * 100 / totalbytes;
         ratio = MIN(ratio, 100);                  ratio = MAX(ratio, 0);
                   ratio = MIN(ratio, 100);
           }
           else
                   ratio = 100;
   
         snprintf(buf, sizeof(buf), "\r%-20.20s %3d%% ", curfile, ratio);          snprintf(buf, sizeof(buf), "\r%-20.20s %3d%% ", curfile, ratio);
   
         barlength = getttywidth() - 51;          barlength = getttywidth() - 51;

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