diff options
Diffstat (limited to 'graphics/netpbm/files/patch-ct')
-rw-r--r-- | graphics/netpbm/files/patch-ct | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/graphics/netpbm/files/patch-ct b/graphics/netpbm/files/patch-ct new file mode 100644 index 000000000000..d359ac34e6a8 --- /dev/null +++ b/graphics/netpbm/files/patch-ct @@ -0,0 +1,42 @@ +--- ppm/411toppm.c.orig Sun Mar 4 08:23:20 2001 ++++ ppm/411toppm.c Tue Mar 27 00:00:00 2001 +@@ -57,9 +57,9 @@ + *==============*/ + #include <stdio.h> + #include <stdlib.h> +-#include <malloc.h> + + #include "ppm.h" ++#include "shhopt.h" + + typedef unsigned char uint8; + +@@ -91,9 +91,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(0, "width", OPT_INT, &cmdline_p->width, 0); + OPTENTRY(0, "height", OPT_INT, &cmdline_p->height, 0); ++ option_def[option_def_index].type = OPT_END; + + /* Set the defaults */ + cmdline_p->width = 64; +@@ -103,7 +113,7 @@ + opt.short_allowed = FALSE; /* We have no short (old-fashioned) options */ + opt.allowNegNum = FALSE; /* We have no 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 (cmdline_p->width <= 0) |