--- pnm/pamchannel.c.orig Sun Aug 6 12:54:35 2000 +++ pnm/pamchannel.c Tue Sep 5 00:00:00 2000 @@ -7,6 +7,7 @@ -----------------------------------------------------------------------------*/ #include "pam.h" +#include "shhopt.h" #define MAX_CHANNELS 16 /* The most channels we allow user to specify */ @@ -37,8 +38,18 @@ 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, "infile", OPT_STRING, &cmdlineP->input_filespec, 0); + option_def[option_def_index].type = OPT_END; /* Set the defaults */ cmdlineP->input_filespec = "-"; @@ -47,7 +58,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 *cmdline_p and others. */ cmdlineP->n_channel = 0;