summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2008-11-04 20:02:58 (GMT)
committer Jaromil <jaromil@dyne.org>2008-11-04 20:02:58 (GMT)
commit354b4b4dbac6b98baf2c421f977c37568570140f (patch)
tree90a2940a2be50d94ad0ea827ceb4719dfc60be15
parentfd946fb8d8a0b491d92d3d5021b2b68d6120ce2a (diff)
small fix to commandline parsing
-rw-r--r--cmdline.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/cmdline.cpp b/cmdline.cpp
index 71b8939..84a9e7c 100644
--- a/cmdline.cpp
+++ b/cmdline.cpp
@@ -178,11 +178,11 @@ void cmdline(int argc, char **argv) {
break;
case 's':
- if( strncasecmp(optarg, "BIN", 3) ==0)
+ if( strcasecmp(optarg, "BIN") ==0)
render = BIN;
- else if( strncasecmp(optarg, "ASCII", 5) ==0)
+ else if( strcasecmp(optarg, "ASCII") ==0)
render = ASCII;
- else if( strncasecmp(optarg, "HTML", 10) ==0)
+ else if( strcasecmp(optarg, "HTML") ==0)
render = HTML;
else {
error ("render format not recognized: %s", optarg);
@@ -193,11 +193,11 @@ void cmdline(int argc, char **argv) {
case 'x':
operation = CONV;
- if( strncasecmp(optarg, "BIN", 3) ==0)
+ if( strcasecmp(optarg, "BIN") ==0)
render = BIN;
- else if( strncasecmp(optarg, "ASCII", 5) ==0)
+ else if( strcasecmp(optarg, "ASCII") ==0)
render = ASCII;
- else if( strncasecmp(optarg, "HTML", 10) ==0)
+ else if( strcasecmp(optarg, "HTML") ==0)
render = HTML;
else {
error ("render format not recognized: %s", optarg);