const char **Order = TFRewritePackageOrder;
if (Source == true)
Order = TFRewriteSourceOrder;
-
+
// Emit
+ FileFd stdoutfd;
+ stdoutfd.OpenDescriptor(STDOUT_FILENO, FileFd::WriteOnly, false);
unsigned char *Buffer = new unsigned char[Largest+1];
for (vector<PkgName>::iterator I = List.begin(); I != List.end(); ++I)
{
delete [] Buffer;
return false;
}
-
- Buffer[I->Length] = '\n';
+
+ Buffer[I->Length] = '\n';
if (Section.Scan((char *)Buffer,I->Length+1) == false)
{
delete [] Buffer;
}
// Sort the section
- if (TFRewrite(stdout,Section,Order,0) == false)
+ if (Section.Write(stdoutfd, Order) == false || stdoutfd.Write("\n", 1) == false)
{
delete [] Buffer;
return _error->Error("Internal error, failed to sort fields");
}
-
- fputc('\n',stdout);
}
-
+
delete [] Buffer;
return true;
}
/* */
static bool ShowHelp(CommandLine &)
{
- ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
- COMMON_ARCH,__DATE__,__TIME__);
+ ioprintf(std::cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH);
if (_config->FindB("version") == true)
return true;