1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-06 22:51:41 +00:00
freebsd-ports/graphics/netpbm/files/patch-bl

34 lines
1.4 KiB
Plaintext
Raw Normal View History

--- pnm/jpegtopnm.c.orig Tue Apr 4 03:09:33 2000
+++ pnm/jpegtopnm.c Sat Apr 15 08:00:00 2000
@@ -31,6 +31,7 @@
#include <stdio.h>
#include <errno.h>
#include <jpeglib.h>
+#include "shhopt.h"
#include "pnm.h"
#define EXIT_WARNING 2 /* Goes with EXIT_FAILURE, EXIT_SUCCESS in stdlib.h */
@@ -100,12 +101,22 @@
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);
OPTENTRY(0, "maxmemory", OPT_STRING, &maxmemory, 0);
OPTENTRY(0, "nosmooth", OPT_FLAG, &cmdline_p->nosmooth, 0);
OPTENTRY(0, "tracelevel", OPT_UINT, &cmdline_p->trace_level, 0);
+ option_def[option_def_index].type = OPT_END;
/* Set the defaults */
cmdline_p->verbose = FALSE;