diff options
Diffstat (limited to 'converter/ppm/yuvtoppm.c')
-rw-r--r-- | converter/ppm/yuvtoppm.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/converter/ppm/yuvtoppm.c b/converter/ppm/yuvtoppm.c index 9c5d79c4..5ee250e2 100644 --- a/converter/ppm/yuvtoppm.c +++ b/converter/ppm/yuvtoppm.c @@ -2,7 +2,7 @@ ** ** by Marc Boucher ** Internet: marc@PostImage.COM -** +** ** Based on Example Conversion Program, A60/A64 Digital Video Interface ** Manual, page 69 ** @@ -43,7 +43,6 @@ parseCommandLine(int argc, const char ** argv, struct CmdlineInfo * const cmdlineP) { optEntry * option_def; - /* Instructions to OptParseOptions3 on how to parse our options */ optStruct3 opt; unsigned int option_def_index; @@ -55,7 +54,7 @@ parseCommandLine(int argc, const char ** argv, opt.short_allowed = FALSE; /* We have no short (old-fashioned) options */ opt.allowNegNum = FALSE; /* We have no parms that are negative numbers */ - pm_optParseOptions3(&argc, (char **)argv, opt, sizeof(opt), 0); + pm_optParseOptions4(&argc, argv, opt, sizeof(opt), 0); /* Uses and sets argc, argv, and some of *cmdlineP and others. */ if (argc-1 < 2) @@ -72,7 +71,7 @@ parseCommandLine(int argc, const char ** argv, cmdlineP->cols = widthArg; cmdlineP->rows = heightArg; - + if (cmdlineP->cols % 2 != 0) pm_error("Number of columns (%u) is odd. " "A YUV image must have an " @@ -213,9 +212,12 @@ main (int argc, const char ** argv) { ifP = pm_openr(cmdline.inputFileName); yuvtoppm(ifP, cmdline.cols, cmdline.rows, stdout); - + pm_close(ifP); pm_close(stdout); return 0; } + + + |