diff options
Diffstat (limited to 'generator')
-rw-r--r-- | generator/pbmmake.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/generator/pbmmake.c b/generator/pbmmake.c index afe1dac3..6c924ac1 100644 --- a/generator/pbmmake.c +++ b/generator/pbmmake.c @@ -75,16 +75,8 @@ parseCommandLine(int argc, char ** argv, "non-option arguments: width and height in pixels", argc-1); else { - cmdlineP->width = atoi(argv[1]); - cmdlineP->height = atoi(argv[2]); - - if (cmdlineP->width < 1) - pm_error("Width must be positive. You specified %d.", - cmdlineP->width); - - if (cmdlineP->height < 1) - pm_error("Height must be positive. You specified %d.", - cmdlineP->height); + cmdlineP->width = pm_parse_width(argv[1]); + cmdlineP->height = pm_parse_height(argv[2]); } } |