about summary refs log tree commit diff
path: root/generator/ppmmake.c
diff options
context:
space:
mode:
Diffstat (limited to 'generator/ppmmake.c')
-rw-r--r--generator/ppmmake.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/generator/ppmmake.c b/generator/ppmmake.c
index eee32485..e59b47d5 100644
--- a/generator/ppmmake.c
+++ b/generator/ppmmake.c
@@ -76,14 +76,8 @@ parseCommandLine(int argc, char ** argv,
                  "You specified %d", argc-1);
     else {
         cmdlineP->color = ppm_parsecolor(argv[1], cmdlineP->maxval);
-        cmdlineP->cols = atoi(argv[2]);
-        cmdlineP->rows = atoi(argv[3]);
-        if (cmdlineP->cols <= 0)
-            pm_error("width argument must be a positive number.  You "
-                     "specified '%s'", argv[2]);
-        if (cmdlineP->rows <= 0)
-            pm_error("height argument must be a positive number.  You "
-                     "specified '%s'", argv[3]);
+        cmdlineP->cols = pm_parse_width(argv[2]);
+        cmdlineP->rows = pm_parse_height(argv[3]);
     }
 }