25 lines
681 B
Plaintext
25 lines
681 B
Plaintext
$NetBSD: patch-ah,v 1.1 2009/12/13 17:42:36 asau Exp $
|
|
|
|
NetBSD provides another "getline".
|
|
|
|
--- extras/htpasswd.c.orig 2009-12-13 20:24:50.000000000 +0300
|
|
+++ extras/htpasswd.c 2009-12-13 20:26:45.000000000 +0300
|
|
@@ -49,7 +49,7 @@
|
|
while((line[y++] = line[x++]));
|
|
}
|
|
|
|
-static int getline(char *s, int n, FILE *f) {
|
|
+static int get_line(char *s, int n, FILE *f) {
|
|
register int i=0;
|
|
|
|
while(1) {
|
|
@@ -189,7 +189,7 @@
|
|
strcpy(user,argv[2]);
|
|
|
|
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;
|