summaryrefslogtreecommitdiff
path: root/tools/preproc/preproc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/preproc/preproc.cpp')
-rw-r--r--tools/preproc/preproc.cpp25
1 files changed, 10 insertions, 15 deletions
diff --git a/tools/preproc/preproc.cpp b/tools/preproc/preproc.cpp
index 2d51ab1..c9c6042 100644
--- a/tools/preproc/preproc.cpp
+++ b/tools/preproc/preproc.cpp
@@ -140,22 +140,17 @@ int main(int argc, char **argv)
g_charmap = new Charmap(argv[2]);
- if (argv[1][0] == '-' && argv[1][1] == 0) {
- PreprocCFile("-");
- } else {
- char* extension = GetFileExtension(argv[1]);
-
- if (!extension)
- FATAL_ERROR("\"%s\" has no file extension.\n", argv[1]);
-
- if ((extension[0] == 's') && extension[1] == 0)
- PreprocAsmFile(argv[1]);
- else if ((extension[0] == 'c' || extension[0] == 'i') && extension[1] == 0)
- PreprocCFile(argv[1]);
- else
- FATAL_ERROR("\"%s\" has an unknown file extension of \"%s\".\n", argv[1], extension);
- }
+ char* extension = GetFileExtension(argv[1]);
+
+ if (!extension)
+ FATAL_ERROR("\"%s\" has no file extension.\n", argv[1]);
+ if ((extension[0] == 's') && extension[1] == 0)
+ PreprocAsmFile(argv[1]);
+ else if ((extension[0] == 'c' || extension[0] == 'i') && extension[1] == 0)
+ PreprocCFile(argv[1]);
+ else
+ FATAL_ERROR("\"%s\" has an unknown file extension of \"%s\".\n", argv[1], extension);
return 0;
}