Reformatting code using Kernighan & Ritchie style, tabs, tab width=4.

Command line: astyle --style=kr --indent=force-tab=4 --lineend=linux -n -r <file names>
This commit is contained in:
lotodore
2011-02-11 20:02:08 +00:00
parent 29dca1846e
commit 02518c67b2
232 changed files with 22743 additions and 21044 deletions
+3 -6
View File
@@ -33,8 +33,7 @@ using namespace boost::filesystem;
int
main(int argc, char *argv[])
{
if (argc != 2)
{
if (argc != 2) {
cout << "Usage: zlib_compress <text input file>" << endl;
return 1;
}
@@ -43,8 +42,7 @@ main(int argc, char *argv[])
path outputFilePath(inputFilePath);
outputFilePath = change_extension(outputFilePath, extension(outputFilePath) + ".z");
// Check whether file exists.
if (!exists(inputFilePath))
{
if (!exists(inputFilePath)) {
cerr << "Input file does not exist." << endl;
return 2;
}
@@ -56,8 +54,7 @@ main(int argc, char *argv[])
out.push(outFile);
boost::iostreams::copy(inFile, out);
cout << "Compression of \"" << inputFilePath.directory_string() << "\" to \"" << outputFilePath.directory_string() << "\" was successful." << endl;
} catch (...)
{
} catch (...) {
cerr << "Compression failed." << endl;
return 3;
}