Fossil SCM

Convert some fopen() calls to fossil_fopen(). Missed them previously.

drh 2011-05-20 11:22 windows-i18n
Commit f626fcaab66a38c4628732db207c24efb15c8b68
+2 -2
--- src/main.c
+++ src/main.c
@@ -1287,12 +1287,12 @@
12871287
if( g.argc!=2 && g.argc!=3 && g.argc!=6 ){
12881288
fossil_fatal("no repository specified");
12891289
}
12901290
g.fullHttpReply = 1;
12911291
if( g.argc==6 ){
1292
- g.httpIn = fopen(g.argv[3], "rb");
1293
- g.httpOut = fopen(g.argv[4], "wb");
1292
+ g.httpIn = fossil_fopen(g.argv[3], "rb");
1293
+ g.httpOut = fossil_fopen(g.argv[4], "wb");
12941294
zIpAddr = g.argv[5];
12951295
}else{
12961296
g.httpIn = stdin;
12971297
g.httpOut = stdout;
12981298
zIpAddr = 0;
12991299
--- src/main.c
+++ src/main.c
@@ -1287,12 +1287,12 @@
1287 if( g.argc!=2 && g.argc!=3 && g.argc!=6 ){
1288 fossil_fatal("no repository specified");
1289 }
1290 g.fullHttpReply = 1;
1291 if( g.argc==6 ){
1292 g.httpIn = fopen(g.argv[3], "rb");
1293 g.httpOut = fopen(g.argv[4], "wb");
1294 zIpAddr = g.argv[5];
1295 }else{
1296 g.httpIn = stdin;
1297 g.httpOut = stdout;
1298 zIpAddr = 0;
1299
--- src/main.c
+++ src/main.c
@@ -1287,12 +1287,12 @@
1287 if( g.argc!=2 && g.argc!=3 && g.argc!=6 ){
1288 fossil_fatal("no repository specified");
1289 }
1290 g.fullHttpReply = 1;
1291 if( g.argc==6 ){
1292 g.httpIn = fossil_fopen(g.argv[3], "rb");
1293 g.httpOut = fossil_fopen(g.argv[4], "wb");
1294 zIpAddr = g.argv[5];
1295 }else{
1296 g.httpIn = stdin;
1297 g.httpOut = stdout;
1298 zIpAddr = 0;
1299
+1 -1
--- src/main.mk
+++ src/main.mk
@@ -892,11 +892,11 @@
892892
$(OBJDIR)/zip.h: $(OBJDIR)/headers
893893
$(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c
894894
$(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT2 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
895895
896896
$(OBJDIR)/shell.o: $(SRCDIR)/shell.c
897
- $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
897
+ $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dfopen=fossil_fopen -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
898898
899899
$(OBJDIR)/th.o: $(SRCDIR)/th.c
900900
$(XTCC) -I$(SRCDIR) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o
901901
902902
$(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c
903903
--- src/main.mk
+++ src/main.mk
@@ -892,11 +892,11 @@
892 $(OBJDIR)/zip.h: $(OBJDIR)/headers
893 $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c
894 $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT2 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
895
896 $(OBJDIR)/shell.o: $(SRCDIR)/shell.c
897 $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
898
899 $(OBJDIR)/th.o: $(SRCDIR)/th.c
900 $(XTCC) -I$(SRCDIR) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o
901
902 $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c
903
--- src/main.mk
+++ src/main.mk
@@ -892,11 +892,11 @@
892 $(OBJDIR)/zip.h: $(OBJDIR)/headers
893 $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c
894 $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT2 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
895
896 $(OBJDIR)/shell.o: $(SRCDIR)/shell.c
897 $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dfopen=fossil_fopen -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
898
899 $(OBJDIR)/th.o: $(SRCDIR)/th.c
900 $(XTCC) -I$(SRCDIR) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o
901
902 $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c
903
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -250,10 +250,11 @@
250250
writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n"
251251
252252
writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c"
253253
set opt {-Dmain=sqlite3_shell}
254254
append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1"
255
+append opt " -Dfopen=fossil_fopen"
255256
writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n"
256257
257258
writeln "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c"
258259
writeln "\t\$(XTCC) -I\$(SRCDIR) -c \$(SRCDIR)/th.c -o \$(OBJDIR)/th.o\n"
259260
260261
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -250,10 +250,11 @@
250 writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n"
251
252 writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c"
253 set opt {-Dmain=sqlite3_shell}
254 append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1"
 
255 writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n"
256
257 writeln "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c"
258 writeln "\t\$(XTCC) -I\$(SRCDIR) -c \$(SRCDIR)/th.c -o \$(OBJDIR)/th.o\n"
259
260
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -250,10 +250,11 @@
250 writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n"
251
252 writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c"
253 set opt {-Dmain=sqlite3_shell}
254 append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1"
255 append opt " -Dfopen=fossil_fopen"
256 writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n"
257
258 writeln "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c"
259 writeln "\t\$(XTCC) -I\$(SRCDIR) -c \$(SRCDIR)/th.c -o \$(OBJDIR)/th.o\n"
260
261
+1 -1
--- src/md5.c
+++ src/md5.c
@@ -376,11 +376,11 @@
376376
FILE *in;
377377
MD5Context ctx;
378378
unsigned char zResult[16];
379379
char zBuf[10240];
380380
381
- in = fopen(zFilename,"rb");
381
+ in = fossil_fopen(zFilename,"rb");
382382
if( in==0 ){
383383
return 1;
384384
}
385385
MD5Init(&ctx);
386386
for(;;){
387387
--- src/md5.c
+++ src/md5.c
@@ -376,11 +376,11 @@
376 FILE *in;
377 MD5Context ctx;
378 unsigned char zResult[16];
379 char zBuf[10240];
380
381 in = fopen(zFilename,"rb");
382 if( in==0 ){
383 return 1;
384 }
385 MD5Init(&ctx);
386 for(;;){
387
--- src/md5.c
+++ src/md5.c
@@ -376,11 +376,11 @@
376 FILE *in;
377 MD5Context ctx;
378 unsigned char zResult[16];
379 char zBuf[10240];
380
381 in = fossil_fopen(zFilename,"rb");
382 if( in==0 ){
383 return 1;
384 }
385 MD5Init(&ctx);
386 for(;;){
387
+1 -1
--- src/sha1.c
+++ src/sha1.c
@@ -266,11 +266,11 @@
266266
FILE *in;
267267
SHA1Context ctx;
268268
unsigned char zResult[20];
269269
char zBuf[10240];
270270
271
- in = fopen(zFilename,"rb");
271
+ in = fossil_fopen(zFilename,"rb");
272272
if( in==0 ){
273273
return 1;
274274
}
275275
SHA1Init(&ctx);
276276
for(;;){
277277
--- src/sha1.c
+++ src/sha1.c
@@ -266,11 +266,11 @@
266 FILE *in;
267 SHA1Context ctx;
268 unsigned char zResult[20];
269 char zBuf[10240];
270
271 in = fopen(zFilename,"rb");
272 if( in==0 ){
273 return 1;
274 }
275 SHA1Init(&ctx);
276 for(;;){
277
--- src/sha1.c
+++ src/sha1.c
@@ -266,11 +266,11 @@
266 FILE *in;
267 SHA1Context ctx;
268 unsigned char zResult[20];
269 char zBuf[10240];
270
271 in = fossil_fopen(zFilename,"rb");
272 if( in==0 ){
273 return 1;
274 }
275 SHA1Init(&ctx);
276 for(;;){
277

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button