rse 98/03/19 01:56:45
Modified: src/support ab.c htpasswd.c htdigest.c suexec.c Log: Also "static" stuff for the support files to make `gcc -Wall -Wshadow -Wmissing-prototypes -Wmissing-declarations' also happy for those sources. Revision Changes Path 1.2 +11 -12 apache-1.3/src/support/ab.c Index: ab.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/support/ab.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ab.c 1998/03/17 12:46:41 1.1 +++ ab.c 1998/03/19 09:56:41 1.2 @@ -183,7 +183,7 @@ /* write out request to a connection - assumes we can write (small) request out in one go into our new socket buffer */ -void write_request(struct connection *c) +static void write_request(struct connection *c) { gettimeofday(&c->connect, 0); write(c->fd, request, reqlen); @@ -196,7 +196,7 @@ /* make an fd non blocking */ -void nonblock(int fd) +static void nonblock(int fd) { int i = 1; ioctl(fd, FIONBIO, &i); @@ -206,7 +206,7 @@ /* returns the time in ms between two timevals */ -int timedif(struct timeval a, struct timeval b) +static int timedif(struct timeval a, struct timeval b) { register int us, s; @@ -221,7 +221,7 @@ /* calculate and output results and exit */ -void output_results() +static void output_results(void) { int timetaken; @@ -285,7 +285,7 @@ /* start asnchronous non-blocking connection */ -void start_connect(struct connection *c) +static void start_connect(struct connection *c) { c->read = 0; c->bread = 0; @@ -325,7 +325,7 @@ /* close down connection and save stats */ -void close_connection(struct connection *c) +static void close_connection(struct connection *c) { if (c->read == 0 && c->keepalive) { /* server has legitiamately shut down an idle keep alive request */ @@ -365,7 +365,7 @@ /* read data from connection */ -void read_connection(struct connection *c) +static void read_connection(struct connection *c) { int r; @@ -490,7 +490,7 @@ /* run the tests */ -int test() +static void test(void) { struct timeval timeout, now; fd_set sel_read, sel_except, sel_write; @@ -580,13 +580,12 @@ if (done >= requests) output_results(); } - return 0; } /* ------------------------------------------------------- */ /* display copyright information */ -void copyright(void) +static void copyright(void) { printf("This is ApacheBench, Version %s\n", VERSION); printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n"); @@ -595,7 +594,7 @@ } /* display usage information */ -void usage(char *progname) +static void usage(char *progname) { fprintf(stderr, "Usage: %s [options] [http://]hostname[:port]/path\n", progname); fprintf(stderr, "Options are:\n"); @@ -612,7 +611,7 @@ /* split URL into parts */ -int parse_url(char *url) +static int parse_url(char *url) { char *cp; char *h; 1.14 +9 -9 apache-1.3/src/support/htpasswd.c Index: htpasswd.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/support/htpasswd.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- htpasswd.c 1998/03/18 00:58:34 1.13 +++ htpasswd.c 1998/03/19 09:56:42 1.14 @@ -30,7 +30,7 @@ char *tn; -char *strd(char *s) +static char *strd(char *s) { char *d; @@ -39,7 +39,7 @@ return (d); } -void getword(char *word, char *line, char stop) +static void getword(char *word, char *line, char stop) { int x = 0, y; @@ -54,7 +54,7 @@ while ((line[y++] = line[x++])); } -int getline(char *s, int n, FILE *f) +static int getline(char *s, int n, FILE *f) { register int i = 0; @@ -72,7 +72,7 @@ } } -void putline(FILE *f, char *l) +static void putline(FILE *f, char *l) { int x; @@ -86,7 +86,7 @@ static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */ "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; -void to64(register char *s, register long v, register int n) +static void to64(register char *s, register long v, register int n) { while (--n >= 0) { *s++ = itoa64[v & 0x3f]; @@ -99,7 +99,7 @@ * issue the prompt and read the results with echo. (Ugh). */ -char *getpass(const char *prompt) +static char *getpass(const char *prompt) { static char password[81]; @@ -116,7 +116,7 @@ #endif -void add_password(char *user, FILE *f) +static void add_password(char *user, FILE *f) { char *pw, *cpw, salt[3]; @@ -135,14 +135,14 @@ fprintf(f, "%s:%s\n", user, cpw); } -void usage() +static void usage(void) { fprintf(stderr, "Usage: htpasswd [-c] passwordfile username\n"); fprintf(stderr, "The -c flag creates a new file.\n"); exit(1); } -void interrupted() +static void interrupted(void) { fprintf(stderr, "Interrupted.\n"); if (tn) 1.15 +7 -7 apache-1.3/src/support/htdigest.c Index: htdigest.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/support/htdigest.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- htdigest.c 1998/01/21 22:05:45 1.14 +++ htdigest.c 1998/03/19 09:56:43 1.15 @@ -32,7 +32,7 @@ char *tn; -char *strd(char *s) +static char *strd(char *s) { char *d; @@ -41,7 +41,7 @@ return (d); } -void getword(char *word, char *line, char stop) +static void getword(char *word, char *line, char stop) { int x = 0, y; @@ -56,7 +56,7 @@ while ((line[y++] = line[x++])); } -int getline(char *s, int n, FILE *f) +static int getline(char *s, int n, FILE *f) { register int i = 0; @@ -74,7 +74,7 @@ } } -void putline(FILE *f, char *l) +static void putline(FILE *f, char *l) { int x; @@ -84,7 +84,7 @@ } -void add_password(char *user, char *realm, FILE *f) +static void add_password(char *user, char *realm, FILE *f) { char *pw; AP_MD5_CTX context; @@ -114,14 +114,14 @@ fprintf(f, "\n"); } -void usage() +static void usage(void) { fprintf(stderr, "Usage: htdigest [-c] passwordfile realm username\n"); fprintf(stderr, "The -c flag creates a new file.\n"); exit(1); } -void interrupted() +static void interrupted(void) { fprintf(stderr, "Interrupted.\n"); if (tn) 1.35 +2 -2 apache-1.3/src/support/suexec.c Index: suexec.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/support/suexec.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- suexec.c 1998/01/30 14:49:54 1.34 +++ suexec.c 1998/03/19 09:56:43 1.35 @@ -186,7 +186,7 @@ return; } -void log_err(const char *fmt,...) +static void log_err(const char *fmt,...) { #ifdef LOG_EXEC va_list ap; @@ -198,7 +198,7 @@ return; } -void clean_env() +static void clean_env(void) { char pathbuf[512]; char **cleanenv;