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

Diff for /src/usr.bin/compress/gzopen.c between version 1.22 and 1.23

version 1.22, 2004/09/06 21:24:11 version 1.23, 2005/06/26 18:20:26
Line 163 
Line 163 
         if (s->z_mode == 'w') {          if (s->z_mode == 'w') {
                 /* write the .gz header */                  /* write the .gz header */
                 if (put_header(s, name, mtime, bits) != 0) {                  if (put_header(s, name, mtime, bits) != 0) {
                         gz_close(s, NULL);                          gz_close(s, NULL, NULL, NULL);
                         s = NULL;                          s = NULL;
                 }                  }
         } else {          } else {
                 /* read the .gz header */                  /* read the .gz header */
                 if (get_header(s, name, gotmagic) != 0) {                  if (get_header(s, name, gotmagic) != 0) {
                         gz_close(s, NULL);                          gz_close(s, NULL, NULL, NULL);
                         s = NULL;                          s = NULL;
                 }                  }
         }          }
Line 178 
Line 178 
 }  }
   
 int  int
 gz_close(void *cookie, struct z_info *info)  gz_close(void *cookie, struct z_info *info, const char *name, struct stat *sb)
 {  {
         gz_stream *s = (gz_stream*)cookie;          gz_stream *s = (gz_stream*)cookie;
         int err = 0;          int err = 0;
Line 214 
Line 214 
                 info->total_out = (off_t)s->z_stream.total_out;                  info->total_out = (off_t)s->z_stream.total_out;
         }          }
   
           setfile(name, s->z_fd, sb);
         if (!err)          if (!err)
                 err = close(s->z_fd);                  err = close(s->z_fd);
         else          else

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23