X-Git-Url: http://git.hcoop.net/ntk/apt.git/blobdiff_plain/2c01f1c077870be1fb00663fc6bb80366498efab..d73fe42cf042fbc9d8d2b38eb67bd7efaa4be412:/cmdline/apt-sortpkgs.cc diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc index e6a6b9a5..c2b11890 100644 --- a/cmdline/apt-sortpkgs.cc +++ b/cmdline/apt-sortpkgs.cc @@ -12,26 +12,29 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include + #include #include #include #include #include #include +#include +#include -#include -#include - #include #include +#include +#include +#include -#include -#include +#include /*}}}*/ using namespace std; -struct PkgName +struct PkgName /*{{{*/ { string Name; string Ver; @@ -55,11 +58,11 @@ struct PkgName bool operator >(const PkgName &x) const {return Compare3(x) > 0;}; bool operator ==(const PkgName &x) const {return Compare3(x) == 0;}; }; - + /*}}}*/ // DoIt - Sort a single file /*{{{*/ // --------------------------------------------------------------------- /* */ -bool DoIt(string InFile) +static bool DoIt(string InFile) { FileFd Fd(InFile,FileFd::ReadOnly); pkgTagFile Tags(&Fd); @@ -106,7 +109,7 @@ bool DoIt(string InFile) // Emit unsigned char *Buffer = new unsigned char[Largest+1]; - for (vector::iterator I = List.begin(); I != List.end(); I++) + for (vector::iterator I = List.begin(); I != List.end(); ++I) { // Read in the Record. if (Fd.Seek(I->Offset) == false || Fd.Read(Buffer,I->Length) == false) @@ -139,10 +142,10 @@ bool DoIt(string InFile) // ShowHelp - Show the help text /*{{{*/ // --------------------------------------------------------------------- /* */ -int ShowHelp() +static int ShowHelp() { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, + COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return 0; @@ -161,8 +164,7 @@ int ShowHelp() return 0; } /*}}}*/ - -int main(unsigned int argc,const char *argv[]) +int main(int argc,const char *argv[]) /*{{{*/ { CommandLine::Args Args[] = { {'h',"help","help",0}, @@ -206,3 +208,4 @@ int main(unsigned int argc,const char *argv[]) return 0; } + /*}}}*/