From: Roland McGrath Date: Mon, 17 Oct 1994 04:09:32 +0000 (+0000) Subject: Deansideclized. X-Git-Tag: cvs/mib-28oct94~71 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3a69434458426f77a56d8ec28291f537d2624b0c;p=thirdparty%2Fglibc.git Deansideclized. --- diff --git a/stdlib/strtol.c b/stdlib/strtol.c index da6c3f1e1f4..cac133e54a5 100644 --- a/stdlib/strtol.c +++ b/stdlib/strtol.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc. + This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,7 +17,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include @@ -39,16 +39,18 @@ unsigned long int #else long int #endif -DEFUN(strtol, (nptr, endptr, base), - CONST char *nptr AND char **endptr AND int base) +strtol (nptr, endptr, base) + const char *nptr; + char **endptr; + int base; { int negative; register unsigned long int cutoff; register unsigned int cutlim; register unsigned long int i; - register CONST char *s; + register const char *s; register unsigned char c; - CONST char *save; + const char *save; int overflow; if (base < 0 || base == 1 || base > 36) @@ -57,7 +59,7 @@ DEFUN(strtol, (nptr, endptr, base), s = nptr; /* Skip white space. */ - while (isspace(*s)) + while (isspace (*s)) ++s; if (*s == '\0') goto noconv; @@ -76,14 +78,14 @@ DEFUN(strtol, (nptr, endptr, base), else negative = 0; - if (base == 16 && s[0] == '0' && toupper(s[1]) == 'X') + if (base == 16 && s[0] == '0' && toupper (s[1]) == 'X') s += 2; /* If BASE is zero, figure it out ourselves. */ if (base == 0) if (*s == '0') { - if (toupper(s[1]) == 'X') + if (toupper (s[1]) == 'X') { s += 2; base = 16; @@ -104,10 +106,10 @@ DEFUN(strtol, (nptr, endptr, base), i = 0; for (c = *s; c != '\0'; c = *++s) { - if (isdigit(c)) + if (isdigit (c)) c -= '0'; - else if (isalpha(c)) - c = toupper(c) - 'A' + 10; + else if (isalpha (c)) + c = toupper (c) - 'A' + 10; else break; if (c >= base) @@ -135,7 +137,7 @@ DEFUN(strtol, (nptr, endptr, base), /* Check for a value that is within the range of `unsigned long int', but outside the range of `long int'. */ if (i > (negative ? - - (unsigned long int) LONG_MIN : (unsigned long int) LONG_MAX)) + -(unsigned long int) LONG_MIN : (unsigned long int) LONG_MAX)) overflow = 1; #endif @@ -150,9 +152,9 @@ DEFUN(strtol, (nptr, endptr, base), } /* Return the result of the appropriate sign. */ - return (negative ? - i : i); + return (negative ? -i : i); - noconv: +noconv: /* There was no number to convert. */ if (endptr != NULL) *endptr = (char *) nptr; diff --git a/sysdeps/generic/strcspn.c b/sysdeps/generic/strcspn.c index aac87aafd73..915faa77c04 100644 --- a/sysdeps/generic/strcspn.c +++ b/sysdeps/generic/strcspn.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1994 Free Software Foundation, Inc. + This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,20 +17,19 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include - /* Return the length of the maximum inital segment of S which contains no characters from REJECT. */ size_t -DEFUN(strcspn, (s, reject), - register CONST char *s AND register CONST char *reject) +strcspn (s, reject) + register const char *s; + register const char *reject; { register size_t count = 0; while (*s != '\0') - if (strchr(reject, *s++) == NULL) + if (strchr (reject, *s++) == NULL) ++count; else return count;