--- ppm/ppmchange.c.orig Mon Jan 8 05:12:30 2001 +++ ppm/ppmchange.c Sat Jan 13 00:00:00 2001 @@ -14,6 +14,7 @@ */ #include "ppm.h" +#include "shhopt.h" #define TCOLS 256 #define SQRT3 1.73205080756887729352 /* The square root of 3 */ @@ -53,9 +54,19 @@ char * remainder_color; /* value of -remainder option */ + /* 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, "closeness", OPT_INT, &cmdlineP->closeness, 0); OPTENTRY(0, "remainder", OPT_STRING, &remainder_color, 0); + option_def[option_def_index].type = OPT_END; /* Set the defaults */ cmdlineP->closeness = 0; @@ -65,7 +76,7 @@ opt.short_allowed = FALSE; /* We have no short (old-fashioned) options */ opt.allowNegNum = FALSE; /* 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 *cmdlineP and others. */ if (remainder_color) {