X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b21c043804b1be7f4d79ac3f5a6615dc96f26a42..cce08fb5aca7dd01706cecea845b183dc62b1717:/apt-inst/contrib/extracttar.cc?ds=sidebyside diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc index b719d5b81..8a535967f 100644 --- a/apt-inst/contrib/extracttar.cc +++ b/apt-inst/contrib/extracttar.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: extracttar.cc,v 1.9 2004/01/07 20:39:37 mdz Exp $ +// $Id: extracttar.cc,v 1.8.2.1 2004/01/16 18:58:50 mdz Exp $ /* ###################################################################### Extract a Tar - Tar Extractor @@ -16,9 +16,6 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#ifdef __GNUG__ -#pragma implementation "apt-pkg/extracttar.h" -#endif #include #include @@ -136,7 +133,8 @@ bool ExtractTar::StartGzip() const char *Args[3]; string confvar = string("dir::bin::") + DecompressProg; - Args[0] = _config->Find(confvar.c_str(),DecompressProg.c_str()).c_str(); + string argv0 = _config->Find(confvar.c_str(),DecompressProg.c_str()); + Args[0] = argv0.c_str(); Args[1] = "-d"; Args[2] = 0; execvp(Args[0],(char **)Args); @@ -192,7 +190,7 @@ bool ExtractTar::Go(pkgDirStream &Stream) return Done(true); if (NewSum != CheckSum) - return _error->Error(_("Tar Checksum failed, archive corrupted")); + return _error->Error(_("Tar checksum failed, archive corrupted")); // Decode all of the fields pkgDirStream::Item Itm; @@ -309,7 +307,7 @@ bool ExtractTar::Go(pkgDirStream &Stream) while (Size != 0) { unsigned char Junk[32*1024]; - unsigned long Read = MIN(Size,sizeof(Junk)); + unsigned long Read = min(Size,(unsigned long)sizeof(Junk)); if (InFd.Read(Junk,((Read+511)/512)*512) == false) return false;