-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtyphoon-1.11.0.patch
347 lines (325 loc) · 10.2 KB
/
typhoon-1.11.0.patch
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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
diff -cr typhoon-1.11.0.ORG/Makefile typhoon-1.11.0/Makefile
*** typhoon-1.11.0.ORG/Makefile Sat Oct 2 03:37:32 1999
--- typhoon-1.11.0/Makefile Mon Jan 20 01:53:31 2003
***************
*** 5,11 ****
DESTMAN = $(PREFIX)/man/man$(MANEXT)
DESTCAT = $(PREFIX)/man/cat$(MANEXT)
DESTOWN = root
! DESTGRP = local
SHELL = /bin/sh
MAKE = make
--- 5,12 ----
DESTMAN = $(PREFIX)/man/man$(MANEXT)
DESTCAT = $(PREFIX)/man/cat$(MANEXT)
DESTOWN = root
! #DESTGRP = local
! DESTGRP = root
SHELL = /bin/sh
MAKE = make
diff -cr typhoon-1.11.0.ORG/configure typhoon-1.11.0/configure
*** typhoon-1.11.0.ORG/configure Mon Oct 4 04:44:22 1999
--- typhoon-1.11.0/configure Mon Jan 20 01:53:31 2003
***************
*** 30,36 ****
compile='$CC $CARGS -o conftest conftest.c >/dev/null 2>&1'
compiled_ok='test -s conftest && (./conftest) >/dev/null 2>/dev/null;'
! DEFS='' # additional -D compiler defines go here
ENVIRON_H=./include/environ.h
ANSI_H=./include/ansi.h
--- 30,36 ----
compile='$CC $CARGS -o conftest conftest.c >/dev/null 2>&1'
compiled_ok='test -s conftest && (./conftest) >/dev/null 2>/dev/null;'
! DEFS='-DEXTEND' # additional -D compiler defines go here
ENVIRON_H=./include/environ.h
ANSI_H=./include/ansi.h
Only in typhoon-1.11.0/examples: Makefile
diff -cr typhoon-1.11.0.ORG/examples/Makefile.in typhoon-1.11.0/examples/Makefile.in
*** typhoon-1.11.0.ORG/examples/Makefile.in Sun Oct 3 23:28:28 1999
--- typhoon-1.11.0/examples/Makefile.in Mon Jan 20 01:53:31 2003
***************
*** 8,14 ****
LDFLAGS = -L../src
DESTBIN = $(PREFIX)/bin
DESTOWN = root
! DESTGRP = local
SHELL = /bin/sh
PROGRAM = demo
SRCS = demo.c
--- 8,15 ----
LDFLAGS = -L../src
DESTBIN = $(PREFIX)/bin
DESTOWN = root
! #DESTGRP = local
! DESTGRP = root
SHELL = /bin/sh
PROGRAM = demo
SRCS = demo.c
Only in typhoon-1.11.0/include: ansi.h
Only in typhoon-1.11.0/include: environ.h
diff -cr typhoon-1.11.0.ORG/man/Makefile typhoon-1.11.0/man/Makefile
*** typhoon-1.11.0.ORG/man/Makefile Sat Oct 2 03:38:13 1999
--- typhoon-1.11.0/man/Makefile Mon Jan 20 01:53:31 2003
***************
*** 7,13 ****
DESTMAN = $(PREFIX)/man/man$(MANEXT)
DESTCAT = $(PREFIX)/man/cat$(MANEXT)
DESTOWN = root
! DESTGRP = local
SHELL = /bin/sh
MANPAGES = d_close.3 d_crget.3 d_crread.3 d_crset.3 d_dbdpath.3 \
d_dbfpath.3 d_dbget.3 d_dbset.3 d_delete.3 d_fillnew.3 \
--- 7,14 ----
DESTMAN = $(PREFIX)/man/man$(MANEXT)
DESTCAT = $(PREFIX)/man/cat$(MANEXT)
DESTOWN = root
! #DESTGRP = local
! DESTGRP = root
SHELL = /bin/sh
MANPAGES = d_close.3 d_crget.3 d_crread.3 d_crset.3 d_dbdpath.3 \
d_dbfpath.3 d_dbget.3 d_dbset.3 d_delete.3 d_fillnew.3 \
***************
*** 38,55 ****
$(CATPAGES): $(MANPAGES)
install: $(CATPAGES)
! -for manpage in $(MANPAGES); do \
! basepage=`expr $$manpage : '\(.*\)\.[^.]*'`; \
! : cp $$manpage $(DESTMAN)/$$basepage.$(MANEXT); \
! : chmod 644 $(DESTMAN)/$$basepage.$(MANEXT); \
! : chown $(DESTOWN) $(DESTMAN)/$$basepage.$(MANEXT); \
! : chgrp $(DESTGRP) $(DESTMAN)/$$basepage.$(MANEXT); \
! compress -c $$basepage.cat \
! >$(DESTCAT)/$$basepage.$(MANEXT).Z; \
! chmod 644 $(DESTCAT)/$$basepage.$(MANEXT)*; \
! chown $(DESTOWN) $(DESTCAT)/$$basepage.$(MANEXT)*; \
! chgrp $(DESTGRP) $(DESTCAT)/$$basepage.$(MANEXT)*; \
! done
uninstall:
-for manpage in $(MANPAGES); do \
--- 39,58 ----
$(CATPAGES): $(MANPAGES)
install: $(CATPAGES)
! # -for manpage in $(MANPAGES); do \
! # basepage=`expr $$manpage : '\(.*\)\.[^.]*'`; \
! #: cp $$manpage $(DESTMAN)/$$basepage.$(MANEXT); \
! #: chmod 644 $(DESTMAN)/$$basepage.$(MANEXT); \
! #: chown $(DESTOWN) $(DESTMAN)/$$basepage.$(MANEXT); \
! #: chgrp $(DESTGRP) $(DESTMAN)/$$basepage.$(MANEXT); \
! # compress -c $$basepage.cat \
! # >$(DESTCAT)/$$basepage.$(MANEXT).Z; \
! # chmod 644 $(DESTCAT)/$$basepage.$(MANEXT)*; \
! # chown $(DESTOWN) $(DESTCAT)/$$basepage.$(MANEXT)*; \
! # chgrp $(DESTGRP) $(DESTCAT)/$$basepage.$(MANEXT)*; \
! # done
! cp d_*.3 $(PREFIX)/man/man3/
! cp ddlp.1 $(PREFIX)/man/man1/
uninstall:
-for manpage in $(MANPAGES); do \
Only in typhoon-1.11.0/src: Makefile
diff -cr typhoon-1.11.0.ORG/src/Makefile.in typhoon-1.11.0/src/Makefile.in
*** typhoon-1.11.0.ORG/src/Makefile.in Sun Oct 3 23:28:28 1999
--- typhoon-1.11.0/src/Makefile.in Mon Jan 20 01:53:31 2003
***************
*** 8,14 ****
DESTLIB = $(PREFIX)/lib
DESTHDR = $(PREFIX)/include
DESTOWN = root
! DESTGRP = local
SHELL = /bin/sh
LIBRARY = libtyphoon.a
LIBHDRS = ../include/environ.h ../include/typhoon.h
--- 8,15 ----
DESTLIB = $(PREFIX)/lib
DESTHDR = $(PREFIX)/include
DESTOWN = root
! #DESTGRP = local
! DESTGRP = root
SHELL = /bin/sh
LIBRARY = libtyphoon.a
LIBHDRS = ../include/environ.h ../include/typhoon.h
diff -cr typhoon-1.11.0.ORG/src/unix.c typhoon-1.11.0/src/unix.c
*** typhoon-1.11.0.ORG/src/unix.c Mon Oct 4 04:39:42 1999
--- typhoon-1.11.0/src/unix.c Mon Jan 20 01:55:20 2003
***************
*** 152,158 ****
while (fcntl(lock_fh, F_SETLK, &flk) == -1)
{
! if (errno != EINTR)
{
printf("ty_lock failed (errno %d, lock_fh %d)\n", errno, lock_fh);
break;
--- 152,158 ----
while (fcntl(lock_fh, F_SETLK, &flk) == -1)
{
! if (errno != EINTR && errno != EAGAIN )
{
printf("ty_lock failed (errno %d, lock_fh %d)\n", errno, lock_fh);
break;
Only in typhoon-1.11.0/util: Makefile
diff -cr typhoon-1.11.0.ORG/util/Makefile.in typhoon-1.11.0/util/Makefile.in
*** typhoon-1.11.0.ORG/util/Makefile.in Sun Oct 3 23:28:29 1999
--- typhoon-1.11.0/util/Makefile.in Mon Jan 20 01:53:31 2003
***************
*** 10,16 ****
LDFLAGS = -L../src
DESTBIN = $(PREFIX)/bin
DESTOWN = root
! DESTGRP = local
SHELL = /bin/sh
PROGRAMS = ddlp dbdview tyexport tyimport # tybackup tyrestore
MADESRCS = ddl.c exp.c imp.c ddl.h exp.h imp.h
--- 10,17 ----
LDFLAGS = -L../src
DESTBIN = $(PREFIX)/bin
DESTOWN = root
! #DESTGRP = local
! DESTGRP = root
SHELL = /bin/sh
PROGRAMS = ddlp dbdview tyexport tyimport # tybackup tyrestore
MADESRCS = ddl.c exp.c imp.c ddl.h exp.h imp.h
***************
*** 72,78 ****
install: $(PROGRAMS)
cp $(PROGRAMS) $(DESTBIN)
! cd $(DESTBIN) && -mcs -c $(PROGRAMS)
cd $(DESTBIN) && strip $(PROGRAMS)
cd $(DESTBIN) && chmod 755 $(PROGRAMS)
cd $(DESTBIN) && chown $(DESTOWN) $(PROGRAMS)
--- 73,79 ----
install: $(PROGRAMS)
cp $(PROGRAMS) $(DESTBIN)
! # cd $(DESTBIN) && -mcs -c $(PROGRAMS)
cd $(DESTBIN) && strip $(PROGRAMS)
cd $(DESTBIN) && chmod 755 $(PROGRAMS)
cd $(DESTBIN) && chown $(DESTOWN) $(PROGRAMS)
diff -cr typhoon-1.11.0.ORG/util/export.c typhoon-1.11.0/util/export.c
*** typhoon-1.11.0.ORG/util/export.c Mon Oct 4 04:11:31 1999
--- typhoon-1.11.0/util/export.c Mon Jan 20 01:53:31 2003
***************
*** 74,85 ****
--- 74,99 ----
FILE *lex_file;
/*------------------------------ local variables ---------------------------*/
+ #ifdef EXTEND
static char paramhelp[] = "\
Syntax: tyexport [option]... database[.dbd]\n\
Options:\n\
+ -s export to stdout (extension by M.Ito)\n\
-f<path> Specify data files path\n\
-g Generate export specification\n\
-n Strings are not null-terminated\n";
+ #else
+ static char paramhelp[] = "\
+ Syntax: tyexport [option]... database[.dbd]\n\
+ Options:\n\
+ -f<path> Specify data files path\n\
+ -g Generate export specification\n\
+ -n Strings are not null-terminated\n";
+ #endif
+
+ #ifdef EXTEND
+ int OutfileIsStdout = 0;
+ #endif
#ifdef CONFIG_PROTOTYPES
void err_quit(char *s, ...)
***************
*** 335,344 ****
--- 349,369 ----
{
sprintf(export_fname, "%s.kom", dbd.record[i].name);
+ #ifdef EXTEND
+ if (OutfileIsStdout == 1){
+ outfile = stdout;
+ }else{
+ if( !(outfile = fopen(export_fname, "w")) )
+ err_quit("Cannot write to '%s'", export_fname);
+
+ printf("exporting to '%s'\n", export_fname);
+ }
+ #else
if( !(outfile = fopen(export_fname, "w")) )
err_quit("Cannot write to '%s'", export_fname);
printf("exporting to '%s'\n", export_fname);
+ #endif
ExportTable(i);
fclose(outfile);
}
***************
*** 398,403 ****
--- 423,433 ----
{
switch( argv[i][1] )
{
+ #ifdef EXTEND
+ case 's':
+ OutfileIsStdout = 1;
+ break;
+ #endif
case 'f':
d_dbfpath(argv[i]+2);
break;
diff -cr typhoon-1.11.0.ORG/util/import.c typhoon-1.11.0/util/import.c
*** typhoon-1.11.0.ORG/util/import.c Mon Oct 4 04:11:32 1999
--- typhoon-1.11.0/util/import.c Mon Jan 20 01:53:31 2003
***************
*** 79,89 ****
--- 79,102 ----
static char import_fname[256];
/*------------------------------ local variables ---------------------------*/
+ #ifdef EXTEND
static char paramhelp[] = "\
Syntax: tyimport [option]... database[.dbd]\n\
Options:\n\
+ -s import from stdin (extension by M.Ito)\n\
-f<path> Specify data files path\n\
-g Generate import specification\n";
+ #else
+ static char paramhelp[] = "\
+ Syntax: tyimport [option]... database[.dbd]\n\
+ Options:\n\
+ -f<path> Specify data files path\n\
+ -g Generate import specification\n";
+ #endif
+
+ #ifdef EXTEND
+ static int InfileIsStdin = 0;
+ #endif
#ifdef CONFIG_PROTOTYPES
void err_quit(char *s, ...)
***************
*** 498,507 ****
--- 511,531 ----
lineno = 1;
sprintf(import_fname, "%s.kom", dbd.record[i].name);
+ #ifdef EXTEND
+ if (InfileIsStdin == 1){
+ infile = stdin;
+ }else{
+ if( !(infile = fopen(import_fname, "r")) )
+ err_quit("Cannot open '%s'", import_fname);
+
+ printf("importing from '%s'\n", import_fname);
+ }
+ #else
if( !(infile = fopen(import_fname, "r")) )
err_quit("Cannot open '%s'", import_fname);
printf("importing from '%s'\n", import_fname);
+ #endif
ImportTable(i);
fclose(infile);
}
***************
*** 568,573 ****
--- 592,603 ----
case 'g':
GenerateImportSpec(realname);
exit(1);
+ #ifdef EXTEND
+ case 's':
+ InfileIsStdin = 1;
+ break;
+ #endif
+
default:
err_quit("unknown command line option");
}