freebsd-ports/graphics/netpbm/files/patch-bl
Steve Price c88dda479a Update to version 9.8.
PR:		21035
Submitted by:	KATO Tsuguru <tkato@prontomail.ne.jp>
2000-09-05 01:11:53 +00:00

36 lines
1.6 KiB
Plaintext

--- pnm/jpegtopnm.c.orig Mon Aug 28 04:56:27 2000
+++ pnm/jpegtopnm.c Tue Sep 5 00:00:00 2000
@@ -161,6 +161,15 @@
char ** const argv_parse = malloc(argc*sizeof(char *));
/* argv, except we modify it as we parse */
+ /* Create the OptStruct structure describing our options */
+ #define OPTENTRY(shortvalue,longvalue,typevalue,outputvalue,flagvalue) {\
+ option_def[option_def_index].shortName = (shortvalue); \
+ option_def[option_def_index].longName = (longvalue); \
+ option_def[option_def_index].type = (typevalue); \
+ option_def[option_def_index].arg = (outputvalue); \
+ option_def[option_def_index].flags = (flagvalue); \
+ option_def_index++; \
+ }
option_def_index = 0; /* incremented by OPTENTRY */
OPTENTRY(0, "verbose", OPT_FLAG, &cmdline_p->verbose, 0);
OPTENTRY(0, "dct", OPT_STRING, &dctval, 0);
@@ -170,6 +179,7 @@
OPTENTRY(0, "adobe", OPT_FLAG, &adobe, 0);
OPTENTRY(0, "notadobe", OPT_FLAG, &notadobe, 0);
OPTENTRY(0, "nosmooth", OPT_FLAG, &cmdline_p->nosmooth, 0);
+ option_def[option_def_index].type = OPT_END;
/* Set the defaults */
cmdline_p->verbose = FALSE;
@@ -188,7 +198,7 @@
argc_parse = argc;
for (i=0; i < argc; i++) argv_parse[i] = argv[i];
- pm_optParseOptions2(&argc_parse, argv_parse, opt, 0);
+ optParseOptions2(&argc_parse, argv_parse, opt, 0);
/* Uses and sets argc_parse, argv_parse,
and some of *cmdline_p and others. */