freebsd-ports/graphics/netpbm/files/patch-bl
FUJISHIMA Satsuki cff2da706a update to 9.10.
PR:		24284
Submitted by:	KATO Tsuguru <tkato@prontomail.ne.jp>
2001-01-29 14:20:45 +00:00

35 lines
1.6 KiB
Text

--- pnm/jpegtopnm.c.orig Sat Dec 16 17:19:20 2000
+++ pnm/jpegtopnm.c Sat Jan 13 00:00:00 2001
@@ -162,6 +162,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);
@@ -171,6 +180,7 @@
OPTENTRY(0, "adobe", OPT_FLAG, &adobe, 0);
OPTENTRY(0, "notadobe", OPT_FLAG, &notadobe, 0);
OPTENTRY(0, "comments", OPT_FLAG, &cmdline_p->comments, 0);
+ option_def[option_def_index].type = OPT_END;
/* Set the defaults */
cmdline_p->verbose = FALSE;
@@ -190,7 +200,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. */