summaryrefslogtreecommitdiff
path: root/graphics/netpbm/patches/patch-bz
blob: d95829211b64717278fed00b16b7e136eaa01f92 (plain)
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
--- ./ppm/xpmtoppm.c.orig	Mon Jan 31 02:42:05 1994
+++ ./ppm/xpmtoppm.c	Fri Aug 18 05:30:36 1995
@@ -30,9 +30,8 @@
 
 #include "ppm.h"
 
-static void ReadXPMFile ARGS((FILE *stream, int *widthP, int *heightP,
-    int *ncolorsP, int *chars_per_pixelP, pixel **colorsP, int **dataP));
-static void getline ARGS((char *line, int size, FILE *stream));
+void ReadXPMFile();
+static void getline();
 
 /* number of xpmColorKeys */
 #define NKEYS 5
@@ -46,7 +45,27 @@
  "c",					/* key #5: color visual */
 };
 
-int
+#ifdef NEED_STRSTR
+/* for systems which do not provide it */
+static char *
+strstr(s1, s2)
+    char *s1, *s2;
+{
+    int ls2 = strlen(s2);
+
+    if (ls2 == 0)
+	return (s1);
+    while (strlen(s1) >= ls2) {
+	if (strncmp(s1, s2, ls2) == 0)
+	    return (s1);
+	s1++;
+    }
+    return (0);
+}
+
+#endif
+
+void
 main(argc, argv)
     int argc;
     char *argv[];
@@ -89,7 +108,6 @@
 
 #define MAX_LINE 2048
 
-static
 void
 ReadXPMFile(stream, widthP, heightP, ncolorsP,
 	    chars_per_pixelP, colorsP, dataP)