mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-27 21:29:02 +00:00
4676671d3d
out of the shared library. PR: ports/18016 Submitted by: KATO Tsuguru <tkato@prontomail.ne.jp>
39 lines
1.4 KiB
Plaintext
39 lines
1.4 KiB
Plaintext
--- ppm/tgatoppm.c.orig Tue Apr 4 03:08:32 2000
|
|
+++ ppm/tgatoppm.c Sat Apr 15 08:00:00 2000
|
|
@@ -13,6 +13,7 @@
|
|
*/
|
|
|
|
#include <string.h>
|
|
+#include "shhopt.h"
|
|
#include "ppm.h"
|
|
#include "pgm.h"
|
|
#include "tga.h"
|
|
@@ -431,16 +432,26 @@
|
|
*/
|
|
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, "headerdump", OPT_FLAG, &cmdline_p->headerdump, 0);
|
|
OPTENTRY('d', "debug", OPT_FLAG, &cmdline_p->headerdump, 0);
|
|
OPTENTRY(0, "alphaout", OPT_STRING, &cmdline_p->alpha_filename, 0);
|
|
+ option_def[option_def_index].type = OPT_END;
|
|
|
|
/* Set the defaults */
|
|
cmdline_p->headerdump = 0;
|
|
cmdline_p->alpha_filename = NULL;
|
|
|
|
- pm_optParseOptions(&argc, argv, option_def, 0);
|
|
+ optParseOptions(&argc, argv, option_def, 0);
|
|
/* Uses and sets argc, argv, and all of *cmdline_p. */
|
|
|
|
if (argc - 1 == 0)
|