mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-31 21:57:12 +00:00
1e508f2672
PR: 18437 Submitted by: KATO Tsuguru <tkato@prontomail.ne.jp>
44 lines
1.7 KiB
Plaintext
44 lines
1.7 KiB
Plaintext
--- ppm/ppmntsc.c.orig Sat Apr 22 08:44:59 2000
|
|
+++ ppm/ppmntsc.c Mon May 8 00:00:00 2000
|
|
@@ -42,6 +42,7 @@
|
|
#include <math.h>
|
|
#include <string.h>
|
|
#include "ppm.h"
|
|
+#include "shhopt.h"
|
|
|
|
#define TRUE 1
|
|
#define FALSE 0
|
|
@@ -440,6 +441,15 @@
|
|
unsigned int option_def_index;
|
|
int legalonly, illegalonly, correctedonly;
|
|
|
|
+ /* 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('v', "verbose", OPT_FLAG, &cmdline_p->verbose, 0);
|
|
OPTENTRY('V', "debug", OPT_FLAG, &cmdline_p->debug, 0);
|
|
@@ -447,6 +457,7 @@
|
|
OPTENTRY('l', "legalonly", OPT_FLAG, &legalonly, 0);
|
|
OPTENTRY('i', "illegalonly", OPT_FLAG, &illegalonly, 0);
|
|
OPTENTRY('c', "correctedonly", OPT_FLAG, &correctedonly, 0);
|
|
+ option_def[option_def_index].type = OPT_END;
|
|
|
|
/* Set the defaults */
|
|
cmdline_p->verbose = FALSE;
|
|
@@ -454,7 +465,7 @@
|
|
cmdline_p->pal = FALSE;
|
|
legalonly = illegalonly = correctedonly = FALSE;
|
|
|
|
- pm_optParseOptions(&argc, argv, option_def, 0);
|
|
+ optParseOptions(&argc, argv, option_def, 0);
|
|
/* Uses and sets argc, argv, and all of *cmdline_p. */
|
|
|
|
if (argc - 1 == 0)
|