summaryrefslogtreecommitdiff
path: root/tools/preproc/preproc.cpp
diff options
context:
space:
mode:
authornullableVoidPtr <30564701+nullableVoidPtr@users.noreply.github.com>2019-08-04 10:18:13 +0000
committernullableVoidPtr <30564701+nullableVoidPtr@users.noreply.github.com>2019-08-04 10:18:13 +0000
commitba6f243c728de5d5c024aeb177026bcc59909e2e (patch)
treeaf8fdeb1c6cdf9cd8584f0d693a4049bfc408b9d /tools/preproc/preproc.cpp
parent6211b0c5ecbe4a43aa3f6e8fd96e99af29caa77a (diff)
parent250a331df9dbd312d572aaf0d629503417cfc9d4 (diff)
Forgot upstream tools tracking
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;
}