mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-31 21:57:12 +00:00
e466c33aa6
PR: 19622 Submitted by: Ports Fury
39 lines
1.3 KiB
Plaintext
39 lines
1.3 KiB
Plaintext
--- pnm/pnmsplit.c.orig Sat Jul 1 03:09:40 2000
|
|
+++ pnm/pnmsplit.c Sat Jul 1 12:00:00 2000
|
|
@@ -13,6 +13,7 @@
|
|
#include <string.h>
|
|
#include <stdio.h>
|
|
#include "pnm.h"
|
|
+#include "shhopt.h"
|
|
|
|
|
|
struct cmdline_info {
|
|
@@ -40,8 +41,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, "debug", OPT_FLAG, &cmdline_p->debug, 0);
|
|
+ option_def[option_def_index].type = OPT_END;
|
|
|
|
/* Set the defaults */
|
|
cmdline_p->debug = FALSE;
|
|
@@ -50,7 +61,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 all of *cmdline_p. */
|
|
|
|
if (argc - 1 < 1)
|