summaryrefslogtreecommitdiff
path: root/media-gfx/transfig/files/transfig-3.2.5e-clang-17.patch
blob: a4b68f22e55eab330aa01d919d8279dfbb89822a (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
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
diff --git a/fig2dev/dev/genibmgl.c b/fig2dev/dev/genibmgl.c
index a14b96f..e24b181 100644
--- a/fig2dev/dev/genibmgl.c
+++ b/fig2dev/dev/genibmgl.c
@@ -50,7 +50,7 @@
 #include "fig2dev.h"
 #include "object.h"
 
-static set_style();
+static void set_style();
 
 #define		FONTS 			35
 #define		COLORS 			8
@@ -458,7 +458,7 @@ F_compound	*objects;
 	    fprintf(tfp, "VS%.2f;\n", pen_speed);
 }
 
-static arc_tangent(x1, y1, x2, y2, direction, x, y)
+static void arc_tangent(x1, y1, x2, y2, direction, x, y)
 double	x1, y1, x2, y2, *x, *y;
 int	direction;
 {
@@ -474,7 +474,7 @@ int	direction;
 
 /*	draw arrow heading from (x1, y1) to (x2, y2)	*/
 
-static draw_arrow_head(x1, y1, x2, y2, arrowht, arrowwid)
+static void draw_arrow_head(x1, y1, x2, y2, arrowht, arrowwid)
 double	x1, y1, x2, y2, arrowht, arrowwid;
 {
 	double	x, y, xb, yb, dx, dy, l, sina, cosa;
@@ -512,7 +512,7 @@ double	x1, y1, x2, y2, arrowht, arrowwid;
 /* 
  * set_style - issue line style commands as appropriate
  */
-static set_style(style, length)
+static void set_style(style, length)
 int	style;
 double	length;
 {
@@ -567,7 +567,7 @@ double	length;
  * set_width - issue line width commands as appropriate
  *		NOTE: HPGL/2 command used
  */
-static set_width(w)
+static int set_width(w)
     int	w;
 {
     static int current_width=-1;
@@ -585,7 +585,7 @@ static set_width(w)
 /* 
  * set_color - issue line color commands as appropriate
  */
-static set_color(color)
+static void set_color(color)
     int	color;
 {
     static	int	number		 = 0;	/* 1 <= number <= 8		*/
@@ -604,7 +604,7 @@ static set_color(color)
 	    }
 }
 
-static fill_polygon(pattern, color)
+static void fill_polygon(pattern, color)
     int	pattern;
     int	color;
 {
@@ -876,7 +876,7 @@ void genibmgl_line(l)
 
 #define		THRESHOLD	.05	/* inch */
 
-static bezier_spline(a0, b0, a1, b1, a2, b2, a3, b3)
+static void bezier_spline(a0, b0, a1, b1, a2, b2, a3, b3)
     double	a0, b0, a1, b1, a2, b2, a3, b3;
 {
 	double	x0, y0, x3, y3;
@@ -932,7 +932,7 @@ F_spline	*s;
 		    s->for_arrow->ht/ppi, s->for_arrow->wid/ppi);
 	}
 
-static quadratic_spline(a1, b1, a2, b2, a3, b3, a4, b4)
+static void quadratic_spline(a1, b1, a2, b2, a3, b3, a4, b4)
 double	a1, b1, a2, b2, a3, b3, a4, b4;
 {
 	double	x1, y1, x4, y4;
diff --git a/fig2dev/dev/genpstex.c b/fig2dev/dev/genpstex.c
index 7ab1fb5..8768d4e 100644
--- a/fig2dev/dev/genpstex.c
+++ b/fig2dev/dev/genpstex.c
@@ -42,6 +42,7 @@
 #include "genpdf.h"
 #include "object.h"
 #include "texfonts.h"
+#include "setfigfont.h"
 
 extern double rad2deg;
 
@@ -105,7 +106,7 @@ static void genpstex_p_finalize_objects(int depth);
 
 /*************************************************************************
  *************************************************************************/
-static
+static int
 translate2(xp, yp)
   int	*xp, *yp;
 {
@@ -113,7 +114,7 @@ translate2(xp, yp)
 	*yp = (double)(TOP - *yp -1);
 	}
 
-static
+static int
 translate1_d(xp, yp)
   double	*xp, *yp;
 {
@@ -121,7 +122,7 @@ translate1_d(xp, yp)
 	*yp = *yp + 1.0;
 	}
 
-static
+static int
 translate2_d(xp, yp)
   double	*xp, *yp;
 {
diff --git a/fig2dev/dev/genshape.c b/fig2dev/dev/genshape.c
index f59448d..b320605 100644
--- a/fig2dev/dev/genshape.c
+++ b/fig2dev/dev/genshape.c
@@ -97,7 +97,7 @@ struct shapegroup {
 typedef struct shapegroup shapegroup;
 
 static shapegroup *shapegroups;
-static num_shapegroups=0;
+static int num_shapegroups=0;
 
 
 static void alloc_arrays() {
@@ -615,7 +615,7 @@ static intersect_point *intersect_points=NULL;
 static int MAX_INTERSECTPOINTS=0;
 #define INTERSECTPOINT_INC 100
 
-static realloc_intersects(int minimum) {
+static void realloc_intersects(int minimum) {
   while (minimum>=MAX_INTERSECTPOINTS) {
     MAX_INTERSECTPOINTS+=INTERSECTPOINT_INC;
     intersect_points=realloc(intersect_points, sizeof(intersect_points[0])*MAX_INTERSECTPOINTS);
diff --git a/fig2dev/dev/readpcx.c b/fig2dev/dev/readpcx.c
index 5b2d3d0..47270da 100644
--- a/fig2dev/dev/readpcx.c
+++ b/fig2dev/dev/readpcx.c
@@ -72,7 +72,7 @@ void dispbyte(unsigned char *ptr,int *xp,int *yp,int c,int w,int h,
 
 void pcx_decode();
 
-_read_pcx(pcxfile,pic)
+int _read_pcx(pcxfile,pic)
     FILE	*pcxfile;
     F_pic	*pic;
 {
diff --git a/fig2dev/fig2dev.c b/fig2dev/fig2dev.c
index 93df432..a0b829e 100644
--- a/fig2dev/fig2dev.c
+++ b/fig2dev/fig2dev.c
@@ -373,7 +373,7 @@ grid_usage()
      fprintf(stderr,"  Ignoring grid.\n");
 }
 
-main(argc, argv)
+void main(argc, argv)
 int	 argc;
 char	*argv[];
 {
diff --git a/fig2dev/fig2dev.h b/fig2dev/fig2dev.h
index 512cddf..346793f 100644
--- a/fig2dev/fig2dev.h
+++ b/fig2dev/fig2dev.h
@@ -160,6 +160,10 @@ extern Boolean	psencode_header_done; /* if we have already emitted PSencode head
 extern Boolean	transp_header_done;   /* if we have already emitted transparent image header */
 extern Boolean	grayonly;	/* convert colors to grayscale (-N option) */
 
+static void     arc_tangent(double x1, double y1, double x2, double y2, int direction, double *x, double *y);
+extern void	 arc_tangent_int(double x1, double y1, double x2, double y2, int direction, int *x, int *y);
+extern int      depth_filter(int);
+
 struct paperdef
 {
     char *name;			/* name for paper size */
diff --git a/fig2dev/latex_line.c b/fig2dev/latex_line.c
index cede1d2..cef37d0 100644
--- a/fig2dev/latex_line.c
+++ b/fig2dev/latex_line.c
@@ -173,7 +173,7 @@ get_slope(dx, dy, sxp, syp, arrow)
     if (dy < 0) *syp = -*syp;
 }
 
-latex_endpoint(x1, y1, x2, y2, xout, yout, arrow, magnet)
+void latex_endpoint(x1, y1, x2, y2, xout, yout, arrow, magnet)
     int  x1, y1, x2, y2;
     int  *xout, *yout;
     int  arrow, magnet;
diff --git a/transfig/sys.c b/transfig/sys.c
index 8d78394..f2fc227 100644
--- a/transfig/sys.c
+++ b/transfig/sys.c
@@ -14,6 +14,12 @@
  *
  */
 
+#define _POSIX_SOURCE
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+#undef _POSIX_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -41,7 +47,7 @@ char *sysls()
   return sysbuf;
 }
 
-sysmv(file)
+void sysmv(file)
 char *file;
 {
   sprintf(sysbuf, "%s~", file);
diff --git a/transfig/transfig.c b/transfig/transfig.c
index 798d05a..0688e84 100644
--- a/transfig/transfig.c
+++ b/transfig/transfig.c
@@ -26,6 +26,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include "patchlevel.h"
 #include "transfig.h"
 
@@ -87,7 +88,7 @@ char *iname[] = {
 	"ps",
 	"eps"};
  
-main(argc, argv)
+int main(argc, argv)
 int argc;
 char *argv[];
 {
diff --git a/transfig/transfig.h b/transfig/transfig.h
index 6773e29..0bf0d50 100644
--- a/transfig/transfig.h
+++ b/transfig/transfig.h
@@ -56,3 +56,6 @@ extern char *txfile, *mkfile;
 extern char *optarg;
 extern int optind;
 
+extern void sysmv();
+extern void makefile();
+extern void texfile();