From owner-svn-src-head@freebsd.org Sun Sep 20 20:50:21 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18386A06E3C; Sun, 20 Sep 2015 20:50:21 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0B671336; Sun, 20 Sep 2015 20:50:20 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8KKoK7D094755; Sun, 20 Sep 2015 20:50:20 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8KKoJUP094750; Sun, 20 Sep 2015 20:50:19 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201509202050.t8KKoJUP094750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Sun, 20 Sep 2015 20:50:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288037 - head/lib/libc/locale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Sep 2015 20:50:21 -0000 Author: rodrigc Date: Sun Sep 20 20:50:18 2015 New Revision: 288037 URL: https://svnweb.freebsd.org/changeset/base/288037 Log: Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. Modified: head/lib/libc/locale/isctype.c head/lib/libc/locale/iswctype.c head/lib/libc/locale/setlocale.c head/lib/libc/locale/tolower.c head/lib/libc/locale/toupper.c Modified: head/lib/libc/locale/isctype.c ============================================================================== --- head/lib/libc/locale/isctype.c Sun Sep 20 20:47:19 2015 (r288036) +++ head/lib/libc/locale/isctype.c Sun Sep 20 20:50:18 2015 (r288037) @@ -45,184 +45,161 @@ __FBSDID("$FreeBSD$"); #undef digittoint int -digittoint(c) - int c; +digittoint(int c) { return (__sbmaskrune(c, 0xFF)); } #undef isalnum int -isalnum(c) - int c; +isalnum(int c) { return (__sbistype(c, _CTYPE_A|_CTYPE_D)); } #undef isalpha int -isalpha(c) - int c; +isalpha(int c) { return (__sbistype(c, _CTYPE_A)); } #undef isascii int -isascii(c) - int c; +isascii(int c) { return ((c & ~0x7F) == 0); } #undef isblank int -isblank(c) - int c; +isblank(int c) { return (__sbistype(c, _CTYPE_B)); } #undef iscntrl int -iscntrl(c) - int c; +iscntrl(int c) { return (__sbistype(c, _CTYPE_C)); } #undef isdigit int -isdigit(c) - int c; +isdigit(int c) { return (__isctype(c, _CTYPE_D)); } #undef isgraph int -isgraph(c) - int c; +isgraph(int c) { return (__sbistype(c, _CTYPE_G)); } #undef ishexnumber int -ishexnumber(c) - int c; +ishexnumber(int c) { return (__sbistype(c, _CTYPE_X)); } #undef isideogram int -isideogram(c) - int c; +isideogram(int c) { return (__sbistype(c, _CTYPE_I)); } #undef islower int -islower(c) - int c; +islower(int c) { return (__sbistype(c, _CTYPE_L)); } #undef isnumber int -isnumber(c) - int c; +isnumber(int c) { return (__sbistype(c, _CTYPE_D)); } #undef isphonogram int -isphonogram(c) - int c; +isphonogram(int c) { return (__sbistype(c, _CTYPE_Q)); } #undef isprint int -isprint(c) - int c; +isprint(int c) { return (__sbistype(c, _CTYPE_R)); } #undef ispunct int -ispunct(c) - int c; +ispunct(int c) { return (__sbistype(c, _CTYPE_P)); } #undef isrune int -isrune(c) - int c; +isrune(int c) { return (__sbistype(c, 0xFFFFFF00L)); } #undef isspace int -isspace(c) - int c; +isspace(int c) { return (__sbistype(c, _CTYPE_S)); } #undef isspecial int -isspecial(c) - int c; +isspecial(int c) { return (__sbistype(c, _CTYPE_T)); } #undef isupper int -isupper(c) - int c; +isupper(int c) { return (__sbistype(c, _CTYPE_U)); } #undef isxdigit int -isxdigit(c) - int c; +isxdigit(int c) { return (__isctype(c, _CTYPE_X)); } #undef toascii int -toascii(c) - int c; +toascii(int c) { return (c & 0x7F); } #undef tolower int -tolower(c) - int c; +tolower(int c) { return (__sbtolower(c)); } #undef toupper int -toupper(c) - int c; +toupper(int c) { return (__sbtoupper(c)); } Modified: head/lib/libc/locale/iswctype.c ============================================================================== --- head/lib/libc/locale/iswctype.c Sun Sep 20 20:47:19 2015 (r288036) +++ head/lib/libc/locale/iswctype.c Sun Sep 20 20:50:18 2015 (r288037) @@ -42,168 +42,147 @@ __FBSDID("$FreeBSD$"); #undef iswalnum int -iswalnum(wc) - wint_t wc; +iswalnum(wint_t wc) { return (__istype(wc, _CTYPE_A|_CTYPE_D)); } #undef iswalpha int -iswalpha(wc) - wint_t wc; +iswalpha(wint_t wc) { return (__istype(wc, _CTYPE_A)); } #undef iswascii int -iswascii(wc) - wint_t wc; +iswascii(wint_t wc) { return ((wc & ~0x7F) == 0); } #undef iswblank int -iswblank(wc) - wint_t wc; +iswblank(wint_t wc) { return (__istype(wc, _CTYPE_B)); } #undef iswcntrl int -iswcntrl(wc) - wint_t wc; +iswcntrl(wint_t wc) { return (__istype(wc, _CTYPE_C)); } #undef iswdigit int -iswdigit(wc) - wint_t wc; +iswdigit(wint_t wc) { return (__isctype(wc, _CTYPE_D)); } #undef iswgraph int -iswgraph(wc) - wint_t wc; +iswgraph(wint_t wc) { return (__istype(wc, _CTYPE_G)); } #undef iswhexnumber int -iswhexnumber(wc) - wint_t wc; +iswhexnumber(wint_t wc) { return (__istype(wc, _CTYPE_X)); } #undef iswideogram int -iswideogram(wc) - wint_t wc; +iswideogram(wint_t wc) { return (__istype(wc, _CTYPE_I)); } #undef iswlower int -iswlower(wc) - wint_t wc; +iswlower(wint_t wc) { return (__istype(wc, _CTYPE_L)); } #undef iswnumber int -iswnumber(wc) - wint_t wc; +iswnumber(wint_t wc) { return (__istype(wc, _CTYPE_D)); } #undef iswphonogram int -iswphonogram(wc) - wint_t wc; +iswphonogram(wint_t wc) { return (__istype(wc, _CTYPE_Q)); } #undef iswprint int -iswprint(wc) - wint_t wc; +iswprint(wint_t wc) { return (__istype(wc, _CTYPE_R)); } #undef iswpunct int -iswpunct(wc) - wint_t wc; +iswpunct(wint_t wc) { return (__istype(wc, _CTYPE_P)); } #undef iswrune int -iswrune(wc) - wint_t wc; +iswrune(wint_t wc) { return (__istype(wc, 0xFFFFFF00L)); } #undef iswspace int -iswspace(wc) - wint_t wc; +iswspace(wint_t wc) { return (__istype(wc, _CTYPE_S)); } #undef iswspecial int -iswspecial(wc) - wint_t wc; +iswspecial(wint_t wc) { return (__istype(wc, _CTYPE_T)); } #undef iswupper int -iswupper(wc) - wint_t wc; +iswupper(wint_t wc) { return (__istype(wc, _CTYPE_U)); } #undef iswxdigit int -iswxdigit(wc) - wint_t wc; +iswxdigit(wint_t wc) { return (__isctype(wc, _CTYPE_X)); } #undef towlower wint_t -towlower(wc) - wint_t wc; +towlower(wint_t wc) { return (__tolower(wc)); } #undef towupper wint_t -towupper(wc) - wint_t wc; +towupper(wint_t wc) { return (__toupper(wc)); } Modified: head/lib/libc/locale/setlocale.c ============================================================================== --- head/lib/libc/locale/setlocale.c Sun Sep 20 20:47:19 2015 (r288036) +++ head/lib/libc/locale/setlocale.c Sun Sep 20 20:50:18 2015 (r288037) @@ -98,9 +98,7 @@ static char *loadlocale(int); const char *__get_locale_env(int); char * -setlocale(category, locale) - int category; - const char *locale; +setlocale(int category, const char *locale) { int i, j, len, saverr; const char *env, *r; @@ -209,7 +207,7 @@ setlocale(category, locale) } static char * -currentlocale() +currentlocale(void) { int i; @@ -228,8 +226,7 @@ currentlocale() } static char * -loadlocale(category) - int category; +loadlocale(int category) { char *new = new_categories[category]; char *old = current_categories[category]; @@ -286,8 +283,7 @@ loadlocale(category) } const char * -__get_locale_env(category) - int category; +__get_locale_env(int category) { const char *env; Modified: head/lib/libc/locale/tolower.c ============================================================================== --- head/lib/libc/locale/tolower.c Sun Sep 20 20:47:19 2015 (r288036) +++ head/lib/libc/locale/tolower.c Sun Sep 20 20:50:18 2015 (r288037) @@ -45,9 +45,7 @@ __FBSDID("$FreeBSD$"); #include "mblocal.h" __ct_rune_t -___tolower_l(c, l) - __ct_rune_t c; - locale_t l; +___tolower_l(__ct_rune_t c, locale_t l) { size_t lim; FIX_LOCALE(l); @@ -72,8 +70,7 @@ ___tolower_l(c, l) return(c); } __ct_rune_t -___tolower(c) - __ct_rune_t c; +___tolower(__ct_rune_t c) { return ___tolower_l(c, __get_locale()); } Modified: head/lib/libc/locale/toupper.c ============================================================================== --- head/lib/libc/locale/toupper.c Sun Sep 20 20:47:19 2015 (r288036) +++ head/lib/libc/locale/toupper.c Sun Sep 20 20:50:18 2015 (r288037) @@ -45,9 +45,7 @@ __FBSDID("$FreeBSD$"); #include "mblocal.h" __ct_rune_t -___toupper_l(c, l) - __ct_rune_t c; - locale_t l; +___toupper_l(__ct_rune_t c, locale_t l) { size_t lim; FIX_LOCALE(l); @@ -74,8 +72,7 @@ ___toupper_l(c, l) return(c); } __ct_rune_t -___toupper(c) - __ct_rune_t c; +___toupper(__ct_rune_t c) { return ___toupper_l(c, __get_locale()); }