summaryrefslogtreecommitdiff
path: root/graphics/netpbm/files/patch-bs
blob: f23e6e7b2346346e4ac9bc66954f3d791f8b82a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
--- 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)