Applied "typo-fix" patch from debian
Fixed bug introduced by boost::filesystem V3 library (missing page-number suffixes on output filenames)
This commit is contained in:
parent
455d121464
commit
6fad7e8bf6
|
@ -2,7 +2,7 @@
|
|||
<project>
|
||||
<configuration id="0.1769827705" name="Default">
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider class="org.eclipse.cdt.core.language.settings.providers.LanguageSettingsGenericProvider" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider" name="CDT User Setting Entries" prefer-non-shared="true"/>
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" ref="shared-provider"/>
|
||||
|
|
|
@ -62,5 +62,8 @@ V3.1.3 me:
|
|||
compilation with Microsoft Visual C.
|
||||
V3.1.4 me:
|
||||
fixed stdout output under Windows (crash), no features added or changed.
|
||||
V3.1.5 me:
|
||||
fixed error introduced by new behaviour of boost::filesystem V3
|
||||
(appending sequential page numbers to output filenames gone missing)
|
||||
--
|
||||
$Id$
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---------------
|
||||
SFFTOBMP V3.1.4
|
||||
SFFTOBMP V3.1.5
|
||||
---------------
|
||||
|
||||
Tool to convert "Structured Fax Files" into Windows bitmaps (BMP),
|
||||
|
@ -114,7 +114,7 @@ OUTSPEC is interpreted as:
|
|||
- a filename if only one input file is given.
|
||||
- a directory name if more than one input file is given.
|
||||
|
||||
If OUTSPEC is ommitted, the name of the output files will be
|
||||
If OUTSPEC is omitted, the name of the output files will be
|
||||
derived from the input files and created in the same directory.
|
||||
|
||||
In case of TIFF output, you can specify the compression by using
|
||||
|
@ -193,7 +193,7 @@ TODO
|
|||
----
|
||||
|
||||
- speed up decoder with better table lookups
|
||||
(looking at GHz CPUs noadays, i doubt that this happes...)
|
||||
(looking at GHz CPUs nowadays, i doubt that this happens...)
|
||||
- support other non-intel architectures (64 Bits, different
|
||||
byte order). Sfftobmp will most likely fail on these.
|
||||
(well, no one complained till now)
|
||||
|
@ -218,11 +218,6 @@ to /dev/null.
|
|||
I'm always pleased to hear that somebody is actually using my
|
||||
software. If you can manage it, e-mail me a quick notice.
|
||||
|
||||
If you *really* like sfftobmp or depend on it, please look
|
||||
into my wishlist:
|
||||
|
||||
http://www.amazon.de/gp/registry/wishlist/OVQ6LSYS4E4D/028-1843567-9543743
|
||||
|
||||
Thanks!
|
||||
|
||||
Contact:
|
||||
|
|
|
@ -109,7 +109,7 @@ void CCmdLineProcessor::printHelp()
|
|||
cout << "The OUTSPEC is interpreted as:" << endl;
|
||||
cout << " - a filename if only one input file is given." << endl;
|
||||
cout << " - a directory name if more than one input file is given." << endl << endl;
|
||||
cout << "If OUTSPEC is ommitted, the name of the output files will be derived from the input" << endl;
|
||||
cout << "If OUTSPEC is omitted, the name of the output files will be derived from the input" << endl;
|
||||
cout << "files and created in the same directory." << endl << endl;
|
||||
cout << "Output on stdout is available for multipaged TIFF output only (option \"-t\")." << endl;
|
||||
cout << "Use \"-\" as output filename in this case." << endl << endl;
|
||||
|
|
|
@ -38,6 +38,8 @@
|
|||
#include <cassert>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
|
@ -71,6 +73,7 @@ int main( int argc, char *argv[] )
|
|||
fs::path pathInFileName;
|
||||
fs::path pathOutFileName;
|
||||
fs::path pathOutDirectory;
|
||||
stringstream ssFilename;
|
||||
|
||||
CCmdLineProcessor proc(argv, argc);
|
||||
|
||||
|
@ -116,7 +119,6 @@ int main( int argc, char *argv[] )
|
|||
{
|
||||
COutputFilter *pOut = NULL;
|
||||
CSffFile *pInfile = NULL;
|
||||
char acNumber[10];
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -172,32 +174,32 @@ int main( int argc, char *argv[] )
|
|||
if (pathOutFileName.string().length()) {
|
||||
// A fixed name was given, so use it as a base name
|
||||
outPath = pathOutFileName;
|
||||
std::string orgExt = fs::extension(outPath);
|
||||
std::string orgExt = outPath.extension().generic_string();
|
||||
if (nFileCountOut > 1) {
|
||||
sprintf(acNumber, "_%03d", nPage+1);
|
||||
outPath = fs::change_extension(outPath, acNumber);
|
||||
if (orgExt.length()) {
|
||||
std::string strTemp = outPath.string();
|
||||
strTemp += orgExt;
|
||||
outPath = fs::path(strTemp);
|
||||
}
|
||||
outPath.replace_extension("");
|
||||
ssFilename << outPath.generic_string();
|
||||
ssFilename << "_" << setw(3) << setfill('0') << nPage+1;
|
||||
ssFilename << orgExt;
|
||||
outPath = fs::path(ssFilename.str());
|
||||
}
|
||||
} else {
|
||||
// Otherwise construct output filename from input filename
|
||||
outPath = pathOutDirectory / pathInFileName.leaf();
|
||||
outPath = pathOutDirectory / pathInFileName.filename();
|
||||
if (nFileCountOut > 1) {
|
||||
sprintf(acNumber, "_%03d", nPage+1);
|
||||
outPath = fs::change_extension(outPath, acNumber);
|
||||
std::string strTemp = outPath.string();
|
||||
strTemp += pOut->GetExtension();
|
||||
outPath = fs::path(strTemp);
|
||||
outPath.replace_extension("");
|
||||
ssFilename << outPath.generic_string();
|
||||
ssFilename << "_" << setw(3) << setfill('0') << nPage+1;
|
||||
ssFilename << pOut->GetExtension();
|
||||
outPath = fs::path(ssFilename.str());
|
||||
} else {
|
||||
outPath = fs::change_extension(outPath, pOut->GetExtension());
|
||||
outPath.replace_extension(pOut->GetExtension());
|
||||
}
|
||||
}
|
||||
if (!proc.doOverwrite() && !((nPage > 0) && (nFileCountOut == 1)) && fs::exists(outPath)) {
|
||||
throw CSimpleException(CSimpleException::err_outfileexists);
|
||||
}
|
||||
ssFilename.str("");
|
||||
ssFilename.clear();
|
||||
}
|
||||
|
||||
bool bIsLowRes = pInfile->IsLowRes(nPage);
|
||||
|
|
|
@ -238,7 +238,7 @@ namespace boost
|
|||
// versions of iterator_adaptor The idea is that when the user needs
|
||||
// to fiddle with the reference type it is highly likely that the
|
||||
// iterator category has to be adjusted as well. Any of the
|
||||
// following four template arguments may be ommitted or explicitly
|
||||
// following four template arguments may be omitted or explicitly
|
||||
// replaced by use_default.
|
||||
//
|
||||
// Value - if supplied, the value_type of the resulting iterator, unless
|
||||
|
|
Loading…
Reference in New Issue