diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2012-03-04 04:05:16 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2012-03-04 04:05:16 +0000 |
commit | ea5319421a589ebd8583734a461346e1f0d91bec (patch) | |
tree | f5bd7462d5be00f2b6c3ea91c579bd03d2ef6dce /usr.sbin/httpd | |
parent | c90e6f8af6e01b6bd2b8ec8057571ae41b0ddb00 (diff) |
In preparation for getline and getdelim additions to libc, rename getline()
occurrences to get_line().
Based on a diff from Jan Klemkow <j-dot-klemkow-at-wemelug-dot-de> to tech.
Diffstat (limited to 'usr.sbin/httpd')
-rw-r--r-- | usr.sbin/httpd/src/support/htdigest.c | 6 | ||||
-rw-r--r-- | usr.sbin/httpd/src/support/htpasswd.c | 6 | ||||
-rw-r--r-- | usr.sbin/httpd/src/support/logresolve.c | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/usr.sbin/httpd/src/support/htdigest.c b/usr.sbin/httpd/src/support/htdigest.c index 849cd013519..9fc243a8309 100644 --- a/usr.sbin/httpd/src/support/htdigest.c +++ b/usr.sbin/httpd/src/support/htdigest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: htdigest.c,v 1.12 2008/08/11 17:15:56 tobias Exp $ */ +/* $OpenBSD: htdigest.c,v 1.13 2012/03/04 04:05:15 fgsch Exp $ */ /* ==================================================================== * The Apache Software License, Version 1.1 @@ -102,7 +102,7 @@ getword(char *word, char *line, char stop) } static int -getline(char *s, int n, FILE *f) +get_line(char *s, int n, FILE *f) { int i = 0; @@ -237,7 +237,7 @@ int main(int argc, char *argv[]) ap_cpystrn(realm, argv[2], sizeof(realm)); found = 0; - while (!(getline(line, MAX_STRING_LEN, f))) { + while (!(get_line(line, MAX_STRING_LEN, f))) { if (found || (line[0] == '#') || (!line[0])) { putline(tfp, line); continue; diff --git a/usr.sbin/httpd/src/support/htpasswd.c b/usr.sbin/httpd/src/support/htpasswd.c index 6c71c08a9bc..6d0ca084f17 100644 --- a/usr.sbin/httpd/src/support/htpasswd.c +++ b/usr.sbin/httpd/src/support/htpasswd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: htpasswd.c,v 1.18 2008/08/11 17:15:56 tobias Exp $ */ +/* $OpenBSD: htpasswd.c,v 1.19 2012/03/04 04:05:15 fgsch Exp $ */ /* ==================================================================== * The Apache Software License, Version 1.1 @@ -130,7 +130,7 @@ static char *tname_buf = NULL; * newline. */ static int -getline(char *s, int n, FILE *f) +get_line(char *s, int n, FILE *f) { int i = 0; @@ -513,7 +513,7 @@ main(int argc, char *argv[]) char scratch[MAX_STRING_LEN]; fpw = fopen(pwfilename, "r"); - while (! (getline(line, sizeof(line), fpw))) { + while (! (get_line(line, sizeof(line), fpw))) { char *colon; if ((line[0] == '#') || (line[0] == '\0')) { diff --git a/usr.sbin/httpd/src/support/logresolve.c b/usr.sbin/httpd/src/support/logresolve.c index e990061c4aa..09da8474dae 100644 --- a/usr.sbin/httpd/src/support/logresolve.c +++ b/usr.sbin/httpd/src/support/logresolve.c @@ -1,4 +1,4 @@ -/* $OpenBSD: logresolve.c,v 1.15 2009/06/21 00:38:22 martynas Exp $ */ +/* $OpenBSD: logresolve.c,v 1.16 2012/03/04 04:05:15 fgsch Exp $ */ /* * logresolve 1.1 @@ -49,7 +49,7 @@ #include <arpa/inet.h> static void cgethost(struct sockaddr *sa, char *string, int check); -static int getline(char *s, int n); +static int get_line(char *s, int n); static void stats(FILE *output); static void usage(void); @@ -258,7 +258,7 @@ stats(FILE *output) /*gets a line from stdin */ static int -getline(char *s, int n) +get_line(char *s, int n) { if (!fgets(s, n, stdin)) return (0); @@ -308,7 +308,7 @@ int main for (i = 0; i < MAX_ERR + 2; i++) errors[i] = 0; - while (getline(line, MAXLINE)) { + while (get_line(line, MAXLINE)) { if (line[0] == '\0') continue; entries++; |