summaryrefslogtreecommitdiff
path: root/graphics/netpbm/files/patch-cb
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/netpbm/files/patch-cb')
-rw-r--r--graphics/netpbm/files/patch-cb39
1 files changed, 39 insertions, 0 deletions
diff --git a/graphics/netpbm/files/patch-cb b/graphics/netpbm/files/patch-cb
new file mode 100644
index 000000000000..c2addc49e961
--- /dev/null
+++ b/graphics/netpbm/files/patch-cb
@@ -0,0 +1,39 @@
+--- pnm/pnminterp.c.orig Sat Jul 22 10:18:38 2000
++++ pnm/pnminterp.c Sat Aug 5 00:00:00 2000
+@@ -21,6 +21,7 @@
+ #include <stdlib.h>
+ #include <ctype.h>
+ #include "pnm.h"
++#include "shhopt.h"
+
+ enum an_edge_mode {
+ EDGE_DROP,
+@@ -73,9 +74,19 @@
+
+ unsigned int option_def_index;
+
++ /* 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('b', "blackedge", OPT_FLAG, &blackedge, 0);
+ OPTENTRY('d', "dropedge", OPT_FLAG, &dropedge, 0);
++ option_def[option_def_index].type = OPT_END;
+
+ /* Set the defaults */
+ blackedge = FALSE;
+@@ -85,7 +96,7 @@
+ opt.short_allowed = TRUE; /* We have some short (old-fashioned) options */
+ opt.allowNegNum = TRUE; /* We may have parms that are negative numbers */
+
+- pm_optParseOptions2(&argc, argv, opt, 0);
++ optParseOptions2(&argc, argv, opt, 0);
+ /* Uses and sets argc, argv, and some of *cmdline_p and others. */
+
+ if (blackedge && dropedge)