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

Diff for /src/usr.bin/ar/Attic/archive.c between version 1.12 and 1.13

version 1.12, 2009/12/13 18:13:28 version 1.13, 2013/04/17 20:17:32
Line 142 
Line 142 
 #define DECIMAL 10  #define DECIMAL 10
 #define OCTAL    8  #define OCTAL    8
   
           /* XXX ar_date 2038 */
         AR_ATOI(hdr->ar_date, chdr.date, sizeof(hdr->ar_date), DECIMAL);          AR_ATOI(hdr->ar_date, chdr.date, sizeof(hdr->ar_date), DECIMAL);
         AR_ATOI(hdr->ar_uid, chdr.uid, sizeof(hdr->ar_uid), DECIMAL);          AR_ATOI(hdr->ar_uid, chdr.uid, sizeof(hdr->ar_uid), DECIMAL);
         AR_ATOI(hdr->ar_gid, chdr.gid, sizeof(hdr->ar_gid), DECIMAL);          AR_ATOI(hdr->ar_gid, chdr.gid, sizeof(hdr->ar_gid), DECIMAL);
Line 230 
Line 231 
                                 (void)fflush(stderr);                                  (void)fflush(stderr);
                         }                          }
                         (void)snprintf(hb, sizeof hb,                          (void)snprintf(hb, sizeof hb,
                             HDR3, name, (long int)sb->st_mtimespec.tv_sec,                              HDR3, name, (long long)sb->st_mtimespec.tv_sec,
                             uid, gid, sb->st_mode, sb->st_size, ARFMAG);                              uid, gid, sb->st_mode, sb->st_size, ARFMAG);
                         lname = 0;                          lname = 0;
                 } else if (lname > sizeof(hdr->ar_name) || strchr(name, ' '))                  } else if (lname > sizeof(hdr->ar_name) || strchr(name, ' '))
                         (void)snprintf(hb, sizeof hb,                          (void)snprintf(hb, sizeof hb,
                             HDR1, AR_EFMT1, lname,                              HDR1, AR_EFMT1, lname,
                             (long int)sb->st_mtimespec.tv_sec,                              (long long)sb->st_mtimespec.tv_sec,
                             uid, gid, sb->st_mode, sb->st_size + lname, ARFMAG);                              uid, gid, sb->st_mode, sb->st_size + lname, ARFMAG);
                 else {                  else {
                         lname = 0;                          lname = 0;
                         (void)snprintf(hb, sizeof hb,                          (void)snprintf(hb, sizeof hb,
                             HDR2, name, (long int)sb->st_mtimespec.tv_sec,                              HDR2, name, (long long)sb->st_mtimespec.tv_sec,
                             uid, gid, sb->st_mode, sb->st_size, ARFMAG);                              uid, gid, sb->st_mode, sb->st_size, ARFMAG);
                 }                  }
                 size = sb->st_size;                  size = sb->st_size;

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