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

Diff for /src/usr.bin/compress/main.c between version 1.93 and 1.94

version 1.93, 2016/09/03 12:29:30 version 1.94, 2016/09/03 13:26:50
Line 548 
Line 548 
         }          }
   
         while ((nr = read(ifd, buf, sizeof(buf))) > 0)          while ((nr = read(ifd, buf, sizeof(buf))) > 0)
                 if ((method->write)(cookie, buf, nr) != nr) {                  if (method->write(cookie, buf, nr) != nr) {
                         if (verbose >= 0)                          if (verbose >= 0)
                                 warn("%s", out);                                  warn("%s", out);
                         error = FAILURE;                          error = FAILURE;
Line 561 
Line 561 
                 error = FAILURE;                  error = FAILURE;
         }          }
   
         if ((method->close)(cookie, &info, out, sb)) {          if (method->close(cookie, &info, out, sb)) {
                 if (!error && verbose >= 0)                  if (!error && verbose >= 0)
                         warn("%s", out);                          warn("%s", out);
                 error = FAILURE;                  error = FAILURE;
Line 693 
Line 693 
                 if (ofd < 0) {                  if (ofd < 0) {
                         if (verbose >= 0)                          if (verbose >= 0)
                                 warn("%s", in);                                  warn("%s", in);
                         (method->close)(cookie, NULL, NULL, NULL);                          method->close(cookie, NULL, NULL, NULL);
                         return (FAILURE);                          return (FAILURE);
                 }                  }
         }          }
   
         while ((nr = (method->read)(cookie, buf, sizeof(buf))) > 0) {          while ((nr = method->read(cookie, buf, sizeof(buf))) > 0) {
                 if (ofd != -1 && write(ofd, buf, nr) != nr) {                  if (ofd != -1 && write(ofd, buf, nr) != nr) {
                         if (verbose >= 0)                          if (verbose >= 0)
                                 warn("%s", out);                                  warn("%s", out);
Line 714 
Line 714 
                 error = errno == EINVAL ? WARNING : FAILURE;                  error = errno == EINVAL ? WARNING : FAILURE;
         }          }
   
         if ((method->close)(cookie, &info, NULL, NULL)) {          if (method->close(cookie, &info, NULL, NULL)) {
                 if (!error && verbose >= 0)                  if (!error && verbose >= 0)
                         warnx("%s", in);                          warnx("%s", in);
                 error = FAILURE;                  error = FAILURE;

Legend:
Removed from v.1.93  
changed lines
  Added in v.1.94