summaryrefslogtreecommitdiff
path: root/src/conv/svg/pict2svg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/conv/svg/pict2svg.cpp')
-rw-r--r--src/conv/svg/pict2svg.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/src/conv/svg/pict2svg.cpp b/src/conv/svg/pict2svg.cpp
index 14038a0..28e7e69 100644
--- a/src/conv/svg/pict2svg.cpp
+++ b/src/conv/svg/pict2svg.cpp
@@ -44,57 +44,57 @@ namespace
int printUsage()
{
- printf("Usage: pict2svg [OPTION] <WordPerfect Graphics File>\n");
- printf("\n");
- printf("Options:\n");
- printf("--help Shows this help message\n");
- printf("--version Output pict2svg version \n");
- return -1;
+ printf("Usage: pict2svg [OPTION] <WordPerfect Graphics File>\n");
+ printf("\n");
+ printf("Options:\n");
+ printf("--help Shows this help message\n");
+ printf("--version Output pict2svg version \n");
+ return -1;
}
int printVersion()
{
- printf("pict2svg %s\n", VERSION);
- return 0;
+ printf("pict2svg %s\n", VERSION);
+ return 0;
}
} // anonymous namespace
int main(int argc, char *argv[])
{
- if (argc < 2)
- return printUsage();
-
- char *file = 0;
-
- for (int i = 1; i < argc; i++)
- {
- if (!strcmp(argv[i], "--version"))
- return printVersion();
- else if (!file && strncmp(argv[i], "--", 2))
- file = argv[i];
- else
- return printUsage();
- }
-
- if (!file)
- return printUsage();
-
- WPXFileStream input(file);
-
- if (!libpict::PictImage::isSupported(&input))
- {
- std::cerr << "ERROR: Unsupported file format (unsupported version) or file is encrypted!" << std::endl;
- return 1;
- }
-
- ::WPXString output;
- if (!libpict::PictImage::generateSVG(&input, output))
- {
- std::cerr << "ERROR: SVG Generation failed!" << std::endl;
- return 1;
- }
-
- std::cout << output.cstr() << std::endl;
- return 0;
+ if (argc < 2)
+ return printUsage();
+
+ char *file = 0;
+
+ for (int i = 1; i < argc; i++)
+ {
+ if (!strcmp(argv[i], "--version"))
+ return printVersion();
+ else if (!file && strncmp(argv[i], "--", 2))
+ file = argv[i];
+ else
+ return printUsage();
+ }
+
+ if (!file)
+ return printUsage();
+
+ WPXFileStream input(file);
+
+ if (!libpict::PictImage::isSupported(&input))
+ {
+ std::cerr << "ERROR: Unsupported file format (unsupported version) or file is encrypted!" << std::endl;
+ return 1;
+ }
+
+ ::WPXString output;
+ if (!libpict::PictImage::generateSVG(&input, output))
+ {
+ std::cerr << "ERROR: SVG Generation failed!" << std::endl;
+ return 1;
+ }
+
+ std::cout << output.cstr() << std::endl;
+ return 0;
}