|
|
@@ -97,7 +97,8 @@ struct partinfo *read_info(FILE *partfile, const char *fn, struct partinfo *ir)
|
|
|
if (fread(&arh,1,sizeof(arh),partfile) != sizeof(arh)) rerreof(partfile,fn);
|
|
|
if (memcmp(arh.ar_fmag,ARFMAG,sizeof(arh.ar_fmag)))
|
|
|
ohshit(_("file `%.250s' is corrupt - bad magic at end of first header"),fn);
|
|
|
- thisilen= parseheaderlength(arh.ar_size,sizeof(arh.ar_size),fn,"info length");
|
|
|
+ thisilen = parseheaderlength(arh.ar_size, sizeof(arh.ar_size), fn,
|
|
|
+ _("info length"));
|
|
|
if (thisilen >= readinfobuflen) {
|
|
|
readinfobuflen= thisilen+1;
|
|
|
readinfobuf= m_realloc(readinfobuf,readinfobuflen);
|
|
|
@@ -115,31 +116,33 @@ struct partinfo *read_info(FILE *partfile, const char *fn, struct partinfo *ir)
|
|
|
ir->filename= fn;
|
|
|
|
|
|
rip= readinfobuf;
|
|
|
- ir->fmtversion= nfstrsave(nextline(&rip,fn,"format version number"));
|
|
|
+ ir->fmtversion = nfstrsave(nextline(&rip, fn, _("format version number")));
|
|
|
if (strcmp(ir->fmtversion,SPLITVERSION))
|
|
|
ohshit(_("file `%.250s' is format version `%.250s' - you need a newer dpkg-split"),
|
|
|
fn,ir->fmtversion);
|
|
|
|
|
|
- ir->package= nfstrsave(nextline(&rip,fn,"package name"));
|
|
|
- ir->version= nfstrsave(nextline(&rip,fn,"package version number"));
|
|
|
- ir->md5sum= nfstrsave(nextline(&rip,fn,"package file MD5 checksum"));
|
|
|
+ ir->package = nfstrsave(nextline(&rip, fn, _("package name")));
|
|
|
+ ir->version = nfstrsave(nextline(&rip, fn, _("package version number")));
|
|
|
+ ir->md5sum = nfstrsave(nextline(&rip, fn, _("package file MD5 checksum")));
|
|
|
if (strlen(ir->md5sum) != 32 ||
|
|
|
strspn(ir->md5sum,"0123456789abcdef") != 32)
|
|
|
ohshit(_("file `%.250s' is corrupt - bad MD5 checksum `%.250s'"),fn,ir->md5sum);
|
|
|
|
|
|
- ir->orglength= unsignedlong(nextline(&rip,fn,"total length"),fn,"total length");
|
|
|
- ir->maxpartlen= unsignedlong(nextline(&rip,fn,"part offset"),fn,"part offset");
|
|
|
+ ir->orglength = unsignedlong(nextline(&rip, fn, _("total length")), fn,
|
|
|
+ _("total length"));
|
|
|
+ ir->maxpartlen = unsignedlong(nextline(&rip, fn, _("part offset")), fn,
|
|
|
+ _("part offset"));
|
|
|
|
|
|
- partnums= nextline(&rip,fn,"part numbers");
|
|
|
+ partnums = nextline(&rip, fn, _("part numbers"));
|
|
|
slash= strchr(partnums,'/');
|
|
|
if (!slash) ohshit(_("file `%.250s' is corrupt - no slash between part numbers"),fn);
|
|
|
*slash++= 0;
|
|
|
|
|
|
- templong= unsignedlong(slash,fn,"number of parts");
|
|
|
+ templong = unsignedlong(slash, fn, _("number of parts"));
|
|
|
if (templong <= 0 || templong > INT_MAX)
|
|
|
- ohshit("file `%.250s' is corrupt - bad number of parts",fn);
|
|
|
+ ohshit(_("file '%.250s' is corrupt - bad number of parts"), fn);
|
|
|
ir->maxpartn= templong;
|
|
|
- templong= unsignedlong(partnums,fn,"parts number");
|
|
|
+ templong = unsignedlong(partnums, fn, _("parts number"));
|
|
|
if (templong <= 0 || templong > ir->maxpartn)
|
|
|
ohshit(_("file `%.250s' is corrupt - bad part number"),fn);
|
|
|
ir->thispartn= templong;
|
|
|
@@ -150,7 +153,8 @@ struct partinfo *read_info(FILE *partfile, const char *fn, struct partinfo *ir)
|
|
|
if (strncmp(arh.ar_name,"data",4))
|
|
|
ohshit(_("file `%.250s' is corrupt - second member is not data member"),fn);
|
|
|
|
|
|
- ir->thispartlen= parseheaderlength(arh.ar_size,sizeof(arh.ar_size),fn,"data length");
|
|
|
+ ir->thispartlen = parseheaderlength(arh.ar_size, sizeof(arh.ar_size), fn,
|
|
|
+ _("data length"));
|
|
|
ir->thispartoffset= (ir->thispartn-1)*ir->maxpartlen;
|
|
|
|
|
|
if (ir->maxpartn != (ir->orglength+ir->maxpartlen-1)/ir->maxpartlen)
|