summaryrefslogtreecommitdiff
path: root/graphics/netpbm/files/patch-aj
blob: 0c4acf838a2b399a342371fd903b1565e3a24b1c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
--- pbmplus.h.orig	Tue Apr  4 02:34:36 2000
+++ pbmplus.h	Sat Apr 15 08:00:00 2000
@@ -24,6 +24,9 @@
 #include <errno.h>
 #endif
 #endif
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
+#include <sys/param.h>
+#endif
 
 #if defined(USG) || defined(SVR4) || defined(VMS) || defined(__SVR4)
 #define SYSV
@@ -34,7 +37,7 @@
 ** and if you run on an Amiga, set AMIGA. If your compiler is ANSI C, you're
 ** probably better off setting SYSV - all it affects is string handling.
 */
-#define BSD
+/* #define BSD */
 /* #define SYSV */
 /* #define MSDOS */
 /* #define AMIGA */
@@ -46,7 +49,7 @@
 ** hex and decimal forms to specify colors (see ppm/pgmtoppm.1 for details).
 */
 #ifndef RGB_DB
-#define RGB_DB "/usr/lib/X11/rgb"
+#define RGB_DB "%%X11BASE%%/lib/X11/rgb"
 /*#define RGB_DB "/usr/openwin/lib/rgb.txt"*/
 #ifdef VMS
 #define RGB_DB "PBMplus_Dir:RGB.TXT"
@@ -117,6 +120,7 @@
 #ifndef VMS
 #include <unistd.h>
 #endif
+#if !(defined(BSD) && (BSD >= 199306))
 extern int atoi();
 extern void exit();
 #ifndef __osf__
@@ -124,6 +128,7 @@
 extern int write();
 #endif
 #endif
+#endif
 
 /* CONFIGURE: On most BSD systems, malloc() gets declared in stdlib.h, on
 ** system V, it gets declared in malloc.h. On some systems, malloc.h
@@ -264,40 +269,6 @@
 int pm_readlittlelong ARGS(( FILE* in, long* lP ));
 int pm_writelittlelong ARGS(( FILE* out, long l ));
 
-
-/* Command line option parsing */
-#include "pbmplus.h"
-/* Shhopt is Sverre Huseby's command line parsing package, which makes
-   writing command parsing code quick and error free.  Some of the Netpbm
-   programs use it.
-*/
-#include "shhopt.h"
-
-void pm_optParseOptions(int *argc, char *argv[],
-                        optStruct opt[], int allowNegNum);
-/* Use pm_optParseOptions instead of optParseOptions in order to use the
-   shared Netpbm libraries
-*/
-
-/* You can use OPTENTRY to assign a value to a dynamically or automatically
-   allocated optStruct structure with minimal typing and easy readability.
-
-   Here is an example:
-
-       unsigned int option_def_index = 0;
-       optStruct *option_def = malloc(100*sizeof(optStruct));
-       OPTENTRY('h', "help",     OPT_FLAG, &help_flag, 0);
-       OPTENTRY(0,   "alphaout", OPT_STRING, &alpha_filename, 0);
-*/       
-
-#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[++option_def_index].type = OPT_END; \
-    }
 
 /* Compatibility stuff */