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
259
260
261
262
263
264
265
266
267
268
269
270
271
|
diff -rc work-orig/iv/src/include/IV-X11/xwindow.h work/iv/src/include/IV-X11/xwindow.h
*** work-orig/iv/src/include/IV-X11/xwindow.h Fri Sep 25 07:46:22 1992
--- ./src/include/IV-X11/xwindow.h Sun May 28 12:49:16 1995
***************
*** 46,53 ****
class Style;
class WindowCursorStack;
class WindowTable;
class XDisplay;
!
struct WindowOverlayInfo {
VisualID id_;
long type_;
--- 46,58 ----
class Style;
class WindowCursorStack;
class WindowTable;
+ /*
+ * modified by jj@ldjpc.apana.org.au
+ *
+ * this seems to break the compile...
class XDisplay;
! *
! */
struct WindowOverlayInfo {
VisualID id_;
long type_;
diff -rc work-orig/iv/src/lib/TIFF/prototypes.h work/iv/src/lib/TIFF/prototypes.h
*** work-orig/iv/src/lib/TIFF/prototypes.h Sun May 28 12:39:56 1995
--- ./src/lib/TIFF/prototypes.h Sun May 28 14:21:04 1995
***************
*** 25,31 ****
*/
#if USE_PROTOTYPES
- va_dcl
#define DECLARE1(f,t1,a1) f(t1 a1)
#define DECLARE2(f,t1,a1,t2,a2) f(t1 a1, t2 a2)
#define DECLARE3(f,t1,a1,t2,a2,t3,a3) f(t1 a1, t2 a2, t3 a3)
--- 25,30 ----
diff -rc work-orig/iv/src/lib/TIFF/tif_aux.c work/iv/src/lib/TIFF/tif_aux.c
*** work-orig/iv/src/lib/TIFF/tif_aux.c Sat Mar 28 08:23:06 1992
--- ./src/lib/TIFF/tif_aux.c Sun May 28 14:15:50 1995
***************
*** 42,47 ****
--- 42,49 ----
* explcit values so that defaults exist only one
* place in the library -- in TIFFDefaultDirectory.
*/
+ ;
+ /* for some reason it needs a ; before this line */
TIFFVGetFieldDefaulted(tif, tag, ap)
TIFF *tif;
int tag;
diff -rc work-orig/iv/src/lib/TIFF/tif_dir.c work/iv/src/lib/TIFF/tif_dir.c
*** work-orig/iv/src/lib/TIFF/tif_dir.c Sat Mar 7 06:29:51 1992
--- ./src/lib/TIFF/tif_dir.c Sun May 28 13:00:03 1995
***************
*** 950,956 ****
}
if (tif->tif_flags & TIFF_SWAB)
TIFFSwabShort(&dircount);
! lseek(tif->tif_fd, dircount*sizeof (TIFFDirEntry), L_INCR);
if (!ReadOK(tif->tif_fd, &nextdir, sizeof (nextdir))) {
TIFFError(module, "%s: Error fetching directory link",
tif->tif_name);
--- 950,957 ----
}
if (tif->tif_flags & TIFF_SWAB)
TIFFSwabShort(&dircount);
! /*added (off_t) .. jj@ldjpc.apana.org.au*/
! lseek(tif->tif_fd, (off_t)(dircount*sizeof (TIFFDirEntry)), L_INCR);
if (!ReadOK(tif->tif_fd, &nextdir, sizeof (nextdir))) {
TIFFError(module, "%s: Error fetching directory link",
tif->tif_name);
diff -rc work-orig/iv/src/lib/TIFF/tif_dirwrite.c work/iv/src/lib/TIFF/tif_dirwrite.c
*** work-orig/iv/src/lib/TIFF/tif_dirwrite.c Wed Mar 18 05:39:29 1992
--- ./src/lib/TIFF/tif_dirwrite.c Sun May 28 12:57:11 1995
***************
*** 177,183 ****
dataoff = tif->tif_diroff + sizeof (short) + dirsize + sizeof (long);
if (dataoff & 1)
dataoff++;
! (void) lseek(tif->tif_fd, dataoff, L_SET);
tif->tif_curdir++;
dir = (TIFFDirEntry *)data;
/*
--- 177,184 ----
dataoff = tif->tif_diroff + sizeof (short) + dirsize + sizeof (long);
if (dataoff & 1)
dataoff++;
! /* added (off_t) below.....jj@ldjpc.apana.org.au*/
! (void) lseek(tif->tif_fd, (off_t)(dataoff), L_SET);
tif->tif_curdir++;
dir = (TIFFDirEntry *)data;
/*
***************
*** 314,320 ****
/*
* Write directory.
*/
! (void) lseek(tif->tif_fd, tif->tif_diroff, L_SET);
dircount = nfields;
if (!WriteOK(tif->tif_fd, &dircount, sizeof (short))) {
TIFFError(tif->tif_name, "Error writing directory count");
--- 315,322 ----
/*
* Write directory.
*/
! /*added (off_t) below.....jj@ldjpc.apana.org.au*/
! (void) lseek(tif->tif_fd, (off_t)(tif->tif_diroff), L_SET);
dircount = nfields;
if (!WriteOK(tif->tif_fd, &dircount, sizeof (short))) {
TIFFError(tif->tif_name, "Error writing directory count");
***************
*** 762,774 ****
u_short dircount;
long nextdir;
! tif->tif_diroff = (lseek(tif->tif_fd, 0L, L_XTND)+1) &~ 1L;
if (tif->tif_header.tiff_diroff == 0) {
/*
* First directory, overwrite header.
*/
tif->tif_header.tiff_diroff = tif->tif_diroff;
! (void) lseek(tif->tif_fd, 0L, L_SET);
if (!WriteOK(tif->tif_fd, &tif->tif_header,
sizeof (tif->tif_header))) {
TIFFError(tif->tif_name, "Error writing TIFF header");
--- 764,778 ----
u_short dircount;
long nextdir;
! /* changed 0L to (off_t)0 below...jj@ldjpc.apana.org.au*/
! tif->tif_diroff = (lseek(tif->tif_fd, (off_t)0, L_XTND)+1) &~ 1L;
if (tif->tif_header.tiff_diroff == 0) {
/*
* First directory, overwrite header.
*/
tif->tif_header.tiff_diroff = tif->tif_diroff;
! /* changed 0L to (off_t)0 .. jj@ldjpc.apana.org.au*/
! (void) lseek(tif->tif_fd, (off_t)0, L_SET);
if (!WriteOK(tif->tif_fd, &tif->tif_header,
sizeof (tif->tif_header))) {
TIFFError(tif->tif_name, "Error writing TIFF header");
***************
*** 788,794 ****
}
if (tif->tif_flags & TIFF_SWAB)
TIFFSwabShort(&dircount);
! lseek(tif->tif_fd, dircount * sizeof (TIFFDirEntry), L_INCR);
if (!ReadOK(tif->tif_fd, &nextdir, sizeof (nextdir))) {
TIFFError(module, "Error fetching directory link");
return (0);
--- 792,799 ----
}
if (tif->tif_flags & TIFF_SWAB)
TIFFSwabShort(&dircount);
! /*added (off_t) below....jj@ldjpc.apana.org.au*/
! lseek(tif->tif_fd, (off_t)(dircount * sizeof (TIFFDirEntry)), L_INCR);
if (!ReadOK(tif->tif_fd, &nextdir, sizeof (nextdir))) {
TIFFError(module, "Error fetching directory link");
return (0);
***************
*** 796,802 ****
if (tif->tif_flags & TIFF_SWAB)
TIFFSwabLong((u_long *)&nextdir);
} while (nextdir != 0);
! (void) lseek(tif->tif_fd, -sizeof (nextdir), L_INCR);
if (!WriteOK(tif->tif_fd, &tif->tif_diroff, sizeof (tif->tif_diroff))) {
TIFFError(module, "Error writing directory link");
return (0);
--- 801,808 ----
if (tif->tif_flags & TIFF_SWAB)
TIFFSwabLong((u_long *)&nextdir);
} while (nextdir != 0);
! /*added (off_t) below ... jj@ldjpc.apana.org.au*/
! (void) lseek(tif->tif_fd, (off_t)(-sizeof (nextdir)), L_INCR);
if (!WriteOK(tif->tif_fd, &tif->tif_diroff, sizeof (tif->tif_diroff))) {
TIFFError(module, "Error writing directory link");
return (0);
diff -rc work-orig/iv/src/lib/TIFF/tif_write.c work/iv/src/lib/TIFF/tif_write.c
*** work-orig/iv/src/lib/TIFF/tif_write.c Tue Feb 11 13:36:47 1992
--- ./src/lib/TIFF/tif_write.c Sun May 28 12:57:57 1995
***************
*** 550,556 ****
}
} else
td->td_stripoffset[strip] =
! lseek(tif->tif_fd, 0L, L_XTND);
tif->tif_curoff = td->td_stripoffset[strip];
}
if (!WriteOK(tif->tif_fd, data, cc)) {
--- 550,557 ----
}
} else
td->td_stripoffset[strip] =
! /*changed 0L to (off_t)0 .. jj@ldjpc.apana.org.au*/
! lseek(tif->tif_fd, (off_t)0, L_XTND);
tif->tif_curoff = td->td_stripoffset[strip];
}
if (!WriteOK(tif->tif_fd, data, cc)) {
diff -rc work-orig/iv/src/lib/TIFF/tiffcompat.h work/iv/src/lib/TIFF/tiffcompat.h
*** work-orig/iv/src/lib/TIFF/tiffcompat.h Tue Mar 31 12:01:04 1992
--- ./src/lib/TIFF/tiffcompat.h Sun May 28 14:13:59 1995
***************
*** 154,160 ****
#define lseek mpw_lseek
extern long mpw_lseek(int, long, int);
#else
! extern long lseek();
#endif
/*
--- 154,161 ----
#define lseek mpw_lseek
extern long mpw_lseek(int, long, int);
#else
! /*changed to the correct one...jj@ldjpc.apana.org.au*/
! extern off_t lseek();
#endif
/*
***************
*** 163,170 ****
#ifndef ReadOK
#define ReadOK(fd, buf, size) (read(fd, (char *)buf, size) == size)
#endif
#ifndef SeekOK
! #define SeekOK(fd, off) (lseek(fd, (long)off, L_SET) == (long)off)
#endif
#ifndef WriteOK
#define WriteOK(fd, buf, size) (write(fd, (char *)buf, size) == size)
--- 164,172 ----
#ifndef ReadOK
#define ReadOK(fd, buf, size) (read(fd, (char *)buf, size) == size)
#endif
+ /*changed (long) to (off_t) to compile....jj@ldjpc.apana.org.au*/
#ifndef SeekOK
! #define SeekOK(fd, off) (lseek(fd, (off_t)off, L_SET) == (off_t)off)
#endif
#ifndef WriteOK
#define WriteOK(fd, buf, size) (write(fd, (char *)buf, size) == size)
***************
*** 202,211 ****
*/
#if defined(__STDC__) && !defined(USE_VARARGS)
#define USE_VARARGS 0
#endif
#if defined(USE_VARARGS)
! #if USE_VARARGS
#include <varargs.h>
#define VA_START(ap, parmN) va_start(ap)
#else
--- 204,218 ----
*/
#if defined(__STDC__) && !defined(USE_VARARGS)
#define USE_VARARGS 0
+ #else
+ #if defined(__FreeBSD__)
+ #undef USE_VARARGS
+ #define USE_VARARGS 0
+ #endif
#endif
#if defined(USE_VARARGS)
! #if USE_VARARGS && !defined(__FreeBSD__)
#include <varargs.h>
#define VA_START(ap, parmN) va_start(ap)
#else
|