Fossil SCM

Add the fossil_nameofexe() function to use in place of g.argv[0].

drh 2010-11-12 21:51 trunk
Commit a04a6508708f78ce2b80f7d3369f508276cd1090
+1 -1
--- src/allrepo.c
+++ src/allrepo.c
@@ -116,11 +116,11 @@
116116
return;
117117
}else{
118118
fossil_fatal("\"all\" subcommand should be one of: "
119119
"ignore list ls push pull rebuild sync");
120120
}
121
- zFossil = quoteFilename(g.argv[0]);
121
+ zFossil = quoteFilename(fossil_nameofexe());
122122
nMissing = 0;
123123
db_prepare(&q,
124124
"SELECT DISTINCT substr(name, 6) COLLATE nocase"
125125
" FROM global_config"
126126
" WHERE substr(name, 1, 5)=='repo:' ORDER BY 1"
127127
--- src/allrepo.c
+++ src/allrepo.c
@@ -116,11 +116,11 @@
116 return;
117 }else{
118 fossil_fatal("\"all\" subcommand should be one of: "
119 "ignore list ls push pull rebuild sync");
120 }
121 zFossil = quoteFilename(g.argv[0]);
122 nMissing = 0;
123 db_prepare(&q,
124 "SELECT DISTINCT substr(name, 6) COLLATE nocase"
125 " FROM global_config"
126 " WHERE substr(name, 1, 5)=='repo:' ORDER BY 1"
127
--- src/allrepo.c
+++ src/allrepo.c
@@ -116,11 +116,11 @@
116 return;
117 }else{
118 fossil_fatal("\"all\" subcommand should be one of: "
119 "ignore list ls push pull rebuild sync");
120 }
121 zFossil = quoteFilename(fossil_nameofexe());
122 nMissing = 0;
123 db_prepare(&q,
124 "SELECT DISTINCT substr(name, 6) COLLATE nocase"
125 " FROM global_config"
126 " WHERE substr(name, 1, 5)=='repo:' ORDER BY 1"
127
+1 -1
--- src/branch.c
+++ src/branch.c
@@ -155,11 +155,11 @@
155155
"\n"
156156
"Note: the local check-out has not been updated to the new\n"
157157
" branch. To begin working on the new branch, do this:\n"
158158
"\n"
159159
" %s update %s\n",
160
- g.argv[0], zBranch
160
+ fossil_nameofexe(), zBranch
161161
);
162162
}
163163
164164
165165
/* Commit */
166166
--- src/branch.c
+++ src/branch.c
@@ -155,11 +155,11 @@
155 "\n"
156 "Note: the local check-out has not been updated to the new\n"
157 " branch. To begin working on the new branch, do this:\n"
158 "\n"
159 " %s update %s\n",
160 g.argv[0], zBranch
161 );
162 }
163
164
165 /* Commit */
166
--- src/branch.c
+++ src/branch.c
@@ -155,11 +155,11 @@
155 "\n"
156 "Note: the local check-out has not been updated to the new\n"
157 " branch. To begin working on the new branch, do this:\n"
158 "\n"
159 " %s update %s\n",
160 fossil_nameofexe(), zBranch
161 );
162 }
163
164
165 /* Commit */
166
+1 -1
--- src/configure.c
+++ src/configure.c
@@ -495,11 +495,11 @@
495495
}
496496
}
497497
db_end_transaction(0);
498498
printf("Configuration reset to factory defaults.\n");
499499
printf("To recover, use: %s %s import %s\n",
500
- g.argv[0], g.argv[1], zBackup);
500
+ fossil_nameofexe(), g.argv[1], zBackup);
501501
}else
502502
{
503503
fossil_fatal("METHOD should be one of:"
504504
" export import merge pull push reset");
505505
}
506506
--- src/configure.c
+++ src/configure.c
@@ -495,11 +495,11 @@
495 }
496 }
497 db_end_transaction(0);
498 printf("Configuration reset to factory defaults.\n");
499 printf("To recover, use: %s %s import %s\n",
500 g.argv[0], g.argv[1], zBackup);
501 }else
502 {
503 fossil_fatal("METHOD should be one of:"
504 " export import merge pull push reset");
505 }
506
--- src/configure.c
+++ src/configure.c
@@ -495,11 +495,11 @@
495 }
496 }
497 db_end_transaction(0);
498 printf("Configuration reset to factory defaults.\n");
499 printf("To recover, use: %s %s import %s\n",
500 fossil_nameofexe(), g.argv[1], zBackup);
501 }else
502 {
503 fossil_fatal("METHOD should be one of:"
504 " export import merge pull push reset");
505 }
506
+1 -1
--- src/db.c
+++ src/db.c
@@ -73,11 +73,11 @@
7373
g.cgiOutput = 0;
7474
cgi_printf("<h1>Database Error</h1>\n"
7575
"<pre>%h</pre><p>%s</p>", z, zRebuildMsg);
7676
cgi_reply();
7777
}else{
78
- fprintf(stderr, "%s: %s\n\n%s", g.argv[0], z, zRebuildMsg);
78
+ fprintf(stderr, "%s: %s\n\n%s", fossil_nameofexe(), z, zRebuildMsg);
7979
}
8080
db_force_rollback();
8181
fossil_exit(1);
8282
}
8383
8484
--- src/db.c
+++ src/db.c
@@ -73,11 +73,11 @@
73 g.cgiOutput = 0;
74 cgi_printf("<h1>Database Error</h1>\n"
75 "<pre>%h</pre><p>%s</p>", z, zRebuildMsg);
76 cgi_reply();
77 }else{
78 fprintf(stderr, "%s: %s\n\n%s", g.argv[0], z, zRebuildMsg);
79 }
80 db_force_rollback();
81 fossil_exit(1);
82 }
83
84
--- src/db.c
+++ src/db.c
@@ -73,11 +73,11 @@
73 g.cgiOutput = 0;
74 cgi_printf("<h1>Database Error</h1>\n"
75 "<pre>%h</pre><p>%s</p>", z, zRebuildMsg);
76 cgi_reply();
77 }else{
78 fprintf(stderr, "%s: %s\n\n%s", fossil_nameofexe(), z, zRebuildMsg);
79 }
80 db_force_rollback();
81 fossil_exit(1);
82 }
83
84
+2 -4
--- src/deltacmd.c
+++ src/deltacmd.c
@@ -49,12 +49,11 @@
4949
** the first file into the second.
5050
*/
5151
void delta_create_cmd(void){
5252
Blob orig, target, delta;
5353
if( g.argc!=5 ){
54
- fprintf(stderr,"Usage: %s %s ORIGIN TARGET DELTA\n", g.argv[0], g.argv[1]);
55
- fossil_exit(1);
54
+ usage("ORIGIN TARGET DELTA");
5655
}
5756
if( blob_read_from_file(&orig, g.argv[2])<0 ){
5857
fprintf(stderr,"cannot read %s\n", g.argv[2]);
5958
fossil_exit(1);
6059
}
@@ -112,12 +111,11 @@
112111
** and write the result.
113112
*/
114113
void delta_apply_cmd(void){
115114
Blob orig, target, delta;
116115
if( g.argc!=5 ){
117
- fprintf(stderr,"Usage: %s %s ORIGIN DELTA TARGET\n", g.argv[0], g.argv[1]);
118
- fossil_exit(1);
116
+ usage("ORIGIN DELTA TARGET");
119117
}
120118
if( blob_read_from_file(&orig, g.argv[2])<0 ){
121119
fprintf(stderr,"cannot read %s\n", g.argv[2]);
122120
fossil_exit(1);
123121
}
124122
--- src/deltacmd.c
+++ src/deltacmd.c
@@ -49,12 +49,11 @@
49 ** the first file into the second.
50 */
51 void delta_create_cmd(void){
52 Blob orig, target, delta;
53 if( g.argc!=5 ){
54 fprintf(stderr,"Usage: %s %s ORIGIN TARGET DELTA\n", g.argv[0], g.argv[1]);
55 fossil_exit(1);
56 }
57 if( blob_read_from_file(&orig, g.argv[2])<0 ){
58 fprintf(stderr,"cannot read %s\n", g.argv[2]);
59 fossil_exit(1);
60 }
@@ -112,12 +111,11 @@
112 ** and write the result.
113 */
114 void delta_apply_cmd(void){
115 Blob orig, target, delta;
116 if( g.argc!=5 ){
117 fprintf(stderr,"Usage: %s %s ORIGIN DELTA TARGET\n", g.argv[0], g.argv[1]);
118 fossil_exit(1);
119 }
120 if( blob_read_from_file(&orig, g.argv[2])<0 ){
121 fprintf(stderr,"cannot read %s\n", g.argv[2]);
122 fossil_exit(1);
123 }
124
--- src/deltacmd.c
+++ src/deltacmd.c
@@ -49,12 +49,11 @@
49 ** the first file into the second.
50 */
51 void delta_create_cmd(void){
52 Blob orig, target, delta;
53 if( g.argc!=5 ){
54 usage("ORIGIN TARGET DELTA");
 
55 }
56 if( blob_read_from_file(&orig, g.argv[2])<0 ){
57 fprintf(stderr,"cannot read %s\n", g.argv[2]);
58 fossil_exit(1);
59 }
@@ -112,12 +111,11 @@
111 ** and write the result.
112 */
113 void delta_apply_cmd(void){
114 Blob orig, target, delta;
115 if( g.argc!=5 ){
116 usage("ORIGIN DELTA TARGET");
 
117 }
118 if( blob_read_from_file(&orig, g.argv[2])<0 ){
119 fprintf(stderr,"cannot read %s\n", g.argv[2]);
120 fossil_exit(1);
121 }
122
--- src/http_transport.c
+++ src/http_transport.c
@@ -294,11 +294,11 @@
294294
fprintf(sshOut, "\n\n");
295295
}else if( g.urlIsFile ){
296296
char *zCmd;
297297
fclose(transport.pFile);
298298
zCmd = mprintf("\"%s\" http \"%s\" \"%s\" \"%s\" 127.0.0.1",
299
- g.argv[0], g.urlName, transport.zOutFile, transport.zInFile
299
+ fossil_nameofexe(), g.urlName, transport.zOutFile, transport.zInFile
300300
);
301301
fossil_system(zCmd);
302302
free(zCmd);
303303
transport.pFile = fopen(transport.zInFile, "rb");
304304
}
305305
--- src/http_transport.c
+++ src/http_transport.c
@@ -294,11 +294,11 @@
294 fprintf(sshOut, "\n\n");
295 }else if( g.urlIsFile ){
296 char *zCmd;
297 fclose(transport.pFile);
298 zCmd = mprintf("\"%s\" http \"%s\" \"%s\" \"%s\" 127.0.0.1",
299 g.argv[0], g.urlName, transport.zOutFile, transport.zInFile
300 );
301 fossil_system(zCmd);
302 free(zCmd);
303 transport.pFile = fopen(transport.zInFile, "rb");
304 }
305
--- src/http_transport.c
+++ src/http_transport.c
@@ -294,11 +294,11 @@
294 fprintf(sshOut, "\n\n");
295 }else if( g.urlIsFile ){
296 char *zCmd;
297 fclose(transport.pFile);
298 zCmd = mprintf("\"%s\" http \"%s\" \"%s\" \"%s\" 127.0.0.1",
299 fossil_nameofexe(), g.urlName, transport.zOutFile, transport.zInFile
300 );
301 fossil_system(zCmd);
302 free(zCmd);
303 transport.pFile = fopen(transport.zInFile, "rb");
304 }
305
+19 -7
--- src/main.c
+++ src/main.c
@@ -268,10 +268,21 @@
268268
** The following variable becomes true while processing a fatal error
269269
** or a panic. If additional "recursive-fatal" errors occur while
270270
** shutting down, the recursive errors are silently ignored.
271271
*/
272272
static int mainInFatalError = 0;
273
+
274
+/*
275
+** Return the name of the current executable.
276
+*/
277
+const char *fossil_nameofexe(void){
278
+#ifdef _WIN32
279
+ return _pgmptr;
280
+#else
281
+ return g.argv[0];
282
+#endif
283
+}
273284
274285
/*
275286
** Exit. Take care to close the database first.
276287
*/
277288
void fossil_exit(int rc){
@@ -294,11 +305,11 @@
294305
if( g.cgiOutput && once ){
295306
once = 0;
296307
cgi_printf("<p class=\"generalError\">%h</p>", z);
297308
cgi_reply();
298309
}else{
299
- fprintf(stderr, "%s: %s\n", g.argv[0], z);
310
+ fprintf(stderr, "%s: %s\n", fossil_nameofexe(), z);
300311
}
301312
db_force_rollback();
302313
fossil_exit(1);
303314
}
304315
void fossil_fatal(const char *zFormat, ...){
@@ -311,11 +322,11 @@
311322
if( g.cgiOutput ){
312323
g.cgiOutput = 0;
313324
cgi_printf("<p class=\"generalError\">%h</p>", z);
314325
cgi_reply();
315326
}else{
316
- fprintf(stderr, "%s: %s\n", g.argv[0], z);
327
+ fprintf(stderr, "%s: %s\n", fossil_nameofexe(), z);
317328
}
318329
db_force_rollback();
319330
fossil_exit(1);
320331
}
321332
@@ -339,11 +350,11 @@
339350
if( g.cgiOutput ){
340351
g.cgiOutput = 0;
341352
cgi_printf("<p class=\"generalError\">%h</p>", z);
342353
cgi_reply();
343354
}else{
344
- fprintf(stderr, "%s: %s\n", g.argv[0], z);
355
+ fprintf(stderr, "%s: %s\n", fossil_nameofexe(), z);
345356
}
346357
db_force_rollback();
347358
fossil_exit(1);
348359
}
349360
@@ -356,11 +367,11 @@
356367
z = vmprintf(zFormat, ap);
357368
va_end(ap);
358369
if( g.cgiOutput ){
359370
cgi_printf("<p class=\"generalError\">%h</p>", z);
360371
}else{
361
- fprintf(stderr, "%s: %s\n", g.argv[0], z);
372
+ fprintf(stderr, "%s: %s\n", fossil_nameofexe(), z);
362373
}
363374
}
364375
365376
/*
366377
** Malloc and free routines that cannot fail
@@ -443,11 +454,11 @@
443454
444455
/*
445456
** Print a usage comment and quit
446457
*/
447458
void usage(const char *zFormat){
448
- fprintf(stderr, "Usage: %s %s %s\n", g.argv[0], g.argv[1], zFormat);
459
+ fprintf(stderr, "Usage: %s %s %s\n", fossil_nameofexe(), g.argv[1], zFormat);
449460
fossil_exit(1);
450461
}
451462
452463
/*
453464
** Remove n elements from g.argv beginning with the i-th element.
@@ -603,11 +614,12 @@
603614
*/
604615
void help_cmd(void){
605616
int rc, idx;
606617
const char *z;
607618
if( g.argc!=3 ){
608
- printf("Usage: %s help COMMAND.\nAvailable COMMANDs:\n", g.argv[0]);
619
+ printf("Usage: %s help COMMAND.\nAvailable COMMANDs:\n",
620
+ fossil_nameofexe());
609621
cmd_cmd_list();
610622
version_cmd();
611623
return;
612624
}
613625
rc = name_search(g.argv[2], aCommand, count(aCommand), &idx);
@@ -621,11 +633,11 @@
621633
fossil_fatal("no help available for the %s command",
622634
aCommand[idx].zName);
623635
}
624636
while( *z ){
625637
if( *z=='%' && strncmp(z, "%fossil", 7)==0 ){
626
- printf("%s", g.argv[0]);
638
+ printf("%s", fossil_nameofexe());
627639
z += 7;
628640
}else{
629641
putchar(*z);
630642
z++;
631643
}
632644
--- src/main.c
+++ src/main.c
@@ -268,10 +268,21 @@
268 ** The following variable becomes true while processing a fatal error
269 ** or a panic. If additional "recursive-fatal" errors occur while
270 ** shutting down, the recursive errors are silently ignored.
271 */
272 static int mainInFatalError = 0;
 
 
 
 
 
 
 
 
 
 
 
273
274 /*
275 ** Exit. Take care to close the database first.
276 */
277 void fossil_exit(int rc){
@@ -294,11 +305,11 @@
294 if( g.cgiOutput && once ){
295 once = 0;
296 cgi_printf("<p class=\"generalError\">%h</p>", z);
297 cgi_reply();
298 }else{
299 fprintf(stderr, "%s: %s\n", g.argv[0], z);
300 }
301 db_force_rollback();
302 fossil_exit(1);
303 }
304 void fossil_fatal(const char *zFormat, ...){
@@ -311,11 +322,11 @@
311 if( g.cgiOutput ){
312 g.cgiOutput = 0;
313 cgi_printf("<p class=\"generalError\">%h</p>", z);
314 cgi_reply();
315 }else{
316 fprintf(stderr, "%s: %s\n", g.argv[0], z);
317 }
318 db_force_rollback();
319 fossil_exit(1);
320 }
321
@@ -339,11 +350,11 @@
339 if( g.cgiOutput ){
340 g.cgiOutput = 0;
341 cgi_printf("<p class=\"generalError\">%h</p>", z);
342 cgi_reply();
343 }else{
344 fprintf(stderr, "%s: %s\n", g.argv[0], z);
345 }
346 db_force_rollback();
347 fossil_exit(1);
348 }
349
@@ -356,11 +367,11 @@
356 z = vmprintf(zFormat, ap);
357 va_end(ap);
358 if( g.cgiOutput ){
359 cgi_printf("<p class=\"generalError\">%h</p>", z);
360 }else{
361 fprintf(stderr, "%s: %s\n", g.argv[0], z);
362 }
363 }
364
365 /*
366 ** Malloc and free routines that cannot fail
@@ -443,11 +454,11 @@
443
444 /*
445 ** Print a usage comment and quit
446 */
447 void usage(const char *zFormat){
448 fprintf(stderr, "Usage: %s %s %s\n", g.argv[0], g.argv[1], zFormat);
449 fossil_exit(1);
450 }
451
452 /*
453 ** Remove n elements from g.argv beginning with the i-th element.
@@ -603,11 +614,12 @@
603 */
604 void help_cmd(void){
605 int rc, idx;
606 const char *z;
607 if( g.argc!=3 ){
608 printf("Usage: %s help COMMAND.\nAvailable COMMANDs:\n", g.argv[0]);
 
609 cmd_cmd_list();
610 version_cmd();
611 return;
612 }
613 rc = name_search(g.argv[2], aCommand, count(aCommand), &idx);
@@ -621,11 +633,11 @@
621 fossil_fatal("no help available for the %s command",
622 aCommand[idx].zName);
623 }
624 while( *z ){
625 if( *z=='%' && strncmp(z, "%fossil", 7)==0 ){
626 printf("%s", g.argv[0]);
627 z += 7;
628 }else{
629 putchar(*z);
630 z++;
631 }
632
--- src/main.c
+++ src/main.c
@@ -268,10 +268,21 @@
268 ** The following variable becomes true while processing a fatal error
269 ** or a panic. If additional "recursive-fatal" errors occur while
270 ** shutting down, the recursive errors are silently ignored.
271 */
272 static int mainInFatalError = 0;
273
274 /*
275 ** Return the name of the current executable.
276 */
277 const char *fossil_nameofexe(void){
278 #ifdef _WIN32
279 return _pgmptr;
280 #else
281 return g.argv[0];
282 #endif
283 }
284
285 /*
286 ** Exit. Take care to close the database first.
287 */
288 void fossil_exit(int rc){
@@ -294,11 +305,11 @@
305 if( g.cgiOutput && once ){
306 once = 0;
307 cgi_printf("<p class=\"generalError\">%h</p>", z);
308 cgi_reply();
309 }else{
310 fprintf(stderr, "%s: %s\n", fossil_nameofexe(), z);
311 }
312 db_force_rollback();
313 fossil_exit(1);
314 }
315 void fossil_fatal(const char *zFormat, ...){
@@ -311,11 +322,11 @@
322 if( g.cgiOutput ){
323 g.cgiOutput = 0;
324 cgi_printf("<p class=\"generalError\">%h</p>", z);
325 cgi_reply();
326 }else{
327 fprintf(stderr, "%s: %s\n", fossil_nameofexe(), z);
328 }
329 db_force_rollback();
330 fossil_exit(1);
331 }
332
@@ -339,11 +350,11 @@
350 if( g.cgiOutput ){
351 g.cgiOutput = 0;
352 cgi_printf("<p class=\"generalError\">%h</p>", z);
353 cgi_reply();
354 }else{
355 fprintf(stderr, "%s: %s\n", fossil_nameofexe(), z);
356 }
357 db_force_rollback();
358 fossil_exit(1);
359 }
360
@@ -356,11 +367,11 @@
367 z = vmprintf(zFormat, ap);
368 va_end(ap);
369 if( g.cgiOutput ){
370 cgi_printf("<p class=\"generalError\">%h</p>", z);
371 }else{
372 fprintf(stderr, "%s: %s\n", fossil_nameofexe(), z);
373 }
374 }
375
376 /*
377 ** Malloc and free routines that cannot fail
@@ -443,11 +454,11 @@
454
455 /*
456 ** Print a usage comment and quit
457 */
458 void usage(const char *zFormat){
459 fprintf(stderr, "Usage: %s %s %s\n", fossil_nameofexe(), g.argv[1], zFormat);
460 fossil_exit(1);
461 }
462
463 /*
464 ** Remove n elements from g.argv beginning with the i-th element.
@@ -603,11 +614,12 @@
614 */
615 void help_cmd(void){
616 int rc, idx;
617 const char *z;
618 if( g.argc!=3 ){
619 printf("Usage: %s help COMMAND.\nAvailable COMMANDs:\n",
620 fossil_nameofexe());
621 cmd_cmd_list();
622 version_cmd();
623 return;
624 }
625 rc = name_search(g.argv[2], aCommand, count(aCommand), &idx);
@@ -621,11 +633,11 @@
633 fossil_fatal("no help available for the %s command",
634 aCommand[idx].zName);
635 }
636 while( *z ){
637 if( *z=='%' && strncmp(z, "%fossil", 7)==0 ){
638 printf("%s", fossil_nameofexe());
639 z += 7;
640 }else{
641 putchar(*z);
642 z++;
643 }
644
+1 -2
--- src/merge3.c
+++ src/merge3.c
@@ -302,12 +302,11 @@
302302
** from PIVOT->VERSION2 and write the combined changes into MERGED.
303303
*/
304304
void delta_3waymerge_cmd(void){
305305
Blob pivot, v1, v2, merged;
306306
if( g.argc!=6 ){
307
- fprintf(stderr,"Usage: %s %s PIVOT V1 V2 MERGED\n", g.argv[0], g.argv[1]);
308
- fossil_exit(1);
307
+ usage("PIVOT V1 V2 MERGED");
309308
}
310309
if( blob_read_from_file(&pivot, g.argv[2])<0 ){
311310
fprintf(stderr,"cannot read %s\n", g.argv[2]);
312311
fossil_exit(1);
313312
}
314313
--- src/merge3.c
+++ src/merge3.c
@@ -302,12 +302,11 @@
302 ** from PIVOT->VERSION2 and write the combined changes into MERGED.
303 */
304 void delta_3waymerge_cmd(void){
305 Blob pivot, v1, v2, merged;
306 if( g.argc!=6 ){
307 fprintf(stderr,"Usage: %s %s PIVOT V1 V2 MERGED\n", g.argv[0], g.argv[1]);
308 fossil_exit(1);
309 }
310 if( blob_read_from_file(&pivot, g.argv[2])<0 ){
311 fprintf(stderr,"cannot read %s\n", g.argv[2]);
312 fossil_exit(1);
313 }
314
--- src/merge3.c
+++ src/merge3.c
@@ -302,12 +302,11 @@
302 ** from PIVOT->VERSION2 and write the combined changes into MERGED.
303 */
304 void delta_3waymerge_cmd(void){
305 Blob pivot, v1, v2, merged;
306 if( g.argc!=6 ){
307 usage("PIVOT V1 V2 MERGED");
 
308 }
309 if( blob_read_from_file(&pivot, g.argv[2])<0 ){
310 fprintf(stderr,"cannot read %s\n", g.argv[2]);
311 fossil_exit(1);
312 }
313
+1 -1
--- src/winhttp.c
+++ src/winhttp.c
@@ -106,11 +106,11 @@
106106
wanted -= got;
107107
}
108108
fclose(out);
109109
out = 0;
110110
sprintf(zCmd, "\"%s\" http \"%s\" %s %s %s%s",
111
- _pgmptr, g.zRepositoryName, zRequestFName, zReplyFName,
111
+ fossil_nameofexe(), g.zRepositoryName, zRequestFName, zReplyFName,
112112
inet_ntoa(p->addr.sin_addr), p->zNotFound
113113
);
114114
fossil_system(zCmd);
115115
in = fopen(zReplyFName, "rb");
116116
if( in ){
117117
--- src/winhttp.c
+++ src/winhttp.c
@@ -106,11 +106,11 @@
106 wanted -= got;
107 }
108 fclose(out);
109 out = 0;
110 sprintf(zCmd, "\"%s\" http \"%s\" %s %s %s%s",
111 _pgmptr, g.zRepositoryName, zRequestFName, zReplyFName,
112 inet_ntoa(p->addr.sin_addr), p->zNotFound
113 );
114 fossil_system(zCmd);
115 in = fopen(zReplyFName, "rb");
116 if( in ){
117
--- src/winhttp.c
+++ src/winhttp.c
@@ -106,11 +106,11 @@
106 wanted -= got;
107 }
108 fclose(out);
109 out = 0;
110 sprintf(zCmd, "\"%s\" http \"%s\" %s %s %s%s",
111 fossil_nameofexe(), g.zRepositoryName, zRequestFName, zReplyFName,
112 inet_ntoa(p->addr.sin_addr), p->zNotFound
113 );
114 fossil_system(zCmd);
115 in = fopen(zReplyFName, "rb");
116 if( in ){
117

Keyboard Shortcuts

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