From eb27c43f02ec7890c19f424de458df903745db5d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 5 Jul 1998 08:24:43 +0000 Subject: Update. 1998-05-23 Philip Blundell * sysdeps/unix/sysv/linux/arm/syscalls.list: Add `syscall'. * sysdeps/unix/sysv/linux/arm/syscall.S: Deleted. 1998-07-05 Ulrich Drepper * misc/getttyent.c (getttyent): Explicitly lock the FILE and use _unlocked functions. * inet/ruserpass.c (ruserpass): Use _unlocked functions since this is a private FILE. --- inet/ruserpass.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'inet/ruserpass.c') diff --git a/inet/ruserpass.c b/inet/ruserpass.c index 421bfc5..9c09051 100644 --- a/inet/ruserpass.c +++ b/inet/ruserpass.c @@ -187,7 +187,8 @@ next: (void) fclose(cfile); return (0); } - while ((c=getc(cfile)) != EOF && c == ' ' || c == '\t'); + while ((c=getc_unlocked(cfile)) != EOF && c == ' ' + || c == '\t'); if (c == EOF || c == '\n') { printf("Missing macdef name argument.\n"); goto bad; @@ -198,7 +199,7 @@ next: } tmp = macros[macnum].mac_name; *tmp++ = c; - for (i=0; i < 8 && (c=getc(cfile)) != EOF && + for (i=0; i < 8 && (c=getc_unlocked(cfile)) != EOF && !isspace(c); ++i) { *tmp++ = c; } @@ -208,7 +209,8 @@ next: } *tmp = '\0'; if (c != '\n') { - while ((c=getc(cfile)) != EOF && c != '\n'); + while ((c=getc_unlocked(cfile)) != EOF + && c != '\n'); } if (c == EOF) { printf("Macro definition missing null line terminator.\n"); @@ -222,7 +224,7 @@ next: } tmp = macros[macnum].mac_start; while (tmp != macbuf + 4096) { - if ((c=getc(cfile)) == EOF) { + if ((c=getc_unlocked(cfile)) == EOF) { printf("Macro definition missing null line terminator.\n"); goto bad; } @@ -265,24 +267,24 @@ token() if (feof(cfile) || ferror(cfile)) return (0); - while ((c = getc(cfile)) != EOF && + while ((c = getc_unlocked(cfile)) != EOF && (c == '\n' || c == '\t' || c == ' ' || c == ',')) continue; if (c == EOF) return (0); cp = tokval; if (c == '"') { - while ((c = getc(cfile)) != EOF && c != '"') { + while ((c = getc_unlocked(cfile)) != EOF && c != '"') { if (c == '\\') - c = getc(cfile); + c = getc_unlocked(cfile); *cp++ = c; } } else { *cp++ = c; - while ((c = getc(cfile)) != EOF + while ((c = getc_unlocked(cfile)) != EOF && c != '\n' && c != '\t' && c != ' ' && c != ',') { if (c == '\\') - c = getc(cfile); + c = getc_unlocked(cfile); *cp++ = c; } } -- cgit v1.1