Fossil SCM

Made remove_from_argv public for use by the upcoming test-import-manifest command. Fixed description of verify_all_options. Initialized variable to silence gcc warning.

aku 2008-02-01 05:29 trunk
Commit da4f0c2638bf64e7a726a09cf03dda11012ca5bf
1 file changed +3 -3
+3 -3
--- src/main.c
+++ src/main.c
@@ -260,11 +260,11 @@
260260
}
261261
262262
/*
263263
** Remove n elements from g.argv beginning with the i-th element.
264264
*/
265
-static void remove_from_argv(int i, int n){
265
+void remove_from_argv(int i, int n){
266266
int j;
267267
for(j=i+n; j<g.argc; i++, j++){
268268
g.argv[i] = g.argv[j];
269269
}
270270
g.argc = i;
@@ -302,11 +302,11 @@
302302
}
303303
return zReturn;
304304
}
305305
306306
/*
307
-** Verify that there are no processed command-line options. If
307
+** Verify that there are no unprocessed command-line options. If
308308
** Any remaining command-line argument begins with "-" print
309309
** an error message and quit.
310310
*/
311311
void verify_all_options(void){
312312
int i;
@@ -457,11 +457,11 @@
457457
** Process the webpage specified by the PATH_INFO or REQUEST_URI
458458
** environment variable.
459459
*/
460460
static void process_one_web_page(void){
461461
const char *zPathInfo;
462
- char *zPath;
462
+ char *zPath = NULL;
463463
int idx;
464464
int i, j;
465465
466466
/* Find the page that the user has requested, construct and deliver that
467467
** page.
468468
--- src/main.c
+++ src/main.c
@@ -260,11 +260,11 @@
260 }
261
262 /*
263 ** Remove n elements from g.argv beginning with the i-th element.
264 */
265 static void remove_from_argv(int i, int n){
266 int j;
267 for(j=i+n; j<g.argc; i++, j++){
268 g.argv[i] = g.argv[j];
269 }
270 g.argc = i;
@@ -302,11 +302,11 @@
302 }
303 return zReturn;
304 }
305
306 /*
307 ** Verify that there are no processed command-line options. If
308 ** Any remaining command-line argument begins with "-" print
309 ** an error message and quit.
310 */
311 void verify_all_options(void){
312 int i;
@@ -457,11 +457,11 @@
457 ** Process the webpage specified by the PATH_INFO or REQUEST_URI
458 ** environment variable.
459 */
460 static void process_one_web_page(void){
461 const char *zPathInfo;
462 char *zPath;
463 int idx;
464 int i, j;
465
466 /* Find the page that the user has requested, construct and deliver that
467 ** page.
468
--- src/main.c
+++ src/main.c
@@ -260,11 +260,11 @@
260 }
261
262 /*
263 ** Remove n elements from g.argv beginning with the i-th element.
264 */
265 void remove_from_argv(int i, int n){
266 int j;
267 for(j=i+n; j<g.argc; i++, j++){
268 g.argv[i] = g.argv[j];
269 }
270 g.argc = i;
@@ -302,11 +302,11 @@
302 }
303 return zReturn;
304 }
305
306 /*
307 ** Verify that there are no unprocessed command-line options. If
308 ** Any remaining command-line argument begins with "-" print
309 ** an error message and quit.
310 */
311 void verify_all_options(void){
312 int i;
@@ -457,11 +457,11 @@
457 ** Process the webpage specified by the PATH_INFO or REQUEST_URI
458 ** environment variable.
459 */
460 static void process_one_web_page(void){
461 const char *zPathInfo;
462 char *zPath = NULL;
463 int idx;
464 int i, j;
465
466 /* Find the page that the user has requested, construct and deliver that
467 ** page.
468

Keyboard Shortcuts

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