diff --git a/sfftobmp3/trunk/.settings/language.settings.xml b/sfftobmp3/trunk/.settings/language.settings.xml index 3f123eb..6574a9f 100644 --- a/sfftobmp3/trunk/.settings/language.settings.xml +++ b/sfftobmp3/trunk/.settings/language.settings.xml @@ -2,7 +2,7 @@ - + diff --git a/sfftobmp3/trunk/doc/changes b/sfftobmp3/trunk/doc/changes index 3d7da60..90c1448 100644 --- a/sfftobmp3/trunk/doc/changes +++ b/sfftobmp3/trunk/doc/changes @@ -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$ diff --git a/sfftobmp3/trunk/doc/readme b/sfftobmp3/trunk/doc/readme index 377fdc3..f2ad515 100644 --- a/sfftobmp3/trunk/doc/readme +++ b/sfftobmp3/trunk/doc/readme @@ -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: diff --git a/sfftobmp3/trunk/src/cmdline.cpp b/sfftobmp3/trunk/src/cmdline.cpp index 3bd76c1..f95a076 100644 --- a/sfftobmp3/trunk/src/cmdline.cpp +++ b/sfftobmp3/trunk/src/cmdline.cpp @@ -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; diff --git a/sfftobmp3/trunk/src/main.cpp b/sfftobmp3/trunk/src/main.cpp index bce34bd..3769bed 100644 --- a/sfftobmp3/trunk/src/main.cpp +++ b/sfftobmp3/trunk/src/main.cpp @@ -38,6 +38,8 @@ #include #include #include +#include +#include #include #include @@ -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); diff --git a/sfftobmp3/trunk/win32/boost/boost/iterator/iterator_adaptor.hpp b/sfftobmp3/trunk/win32/boost/boost/iterator/iterator_adaptor.hpp index 66b6907..21894ab 100644 --- a/sfftobmp3/trunk/win32/boost/boost/iterator/iterator_adaptor.hpp +++ b/sfftobmp3/trunk/win32/boost/boost/iterator/iterator_adaptor.hpp @@ -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