summaryrefslogtreecommitdiffstats
path: root/lib/libc/locale
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2012-12-10 17:34:33 +0000
committerbrooks <brooks@FreeBSD.org>2012-12-10 17:34:33 +0000
commit8f8a6363fa6769d8a9a530131101dfc5972b9cc9 (patch)
treee19cb3d4bfff056effee92ddce286f635cf4e8ff /lib/libc/locale
parent726beb3d43000997e7410621a0c31a65b05ebb31 (diff)
downloadFreeBSD-src-8f8a6363fa6769d8a9a530131101dfc5972b9cc9.zip
FreeBSD-src-8f8a6363fa6769d8a9a530131101dfc5972b9cc9.tar.gz
Improve style(9) compliance of function declarations.
Diffstat (limited to 'lib/libc/locale')
-rw-r--r--lib/libc/locale/setrunelocale.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/libc/locale/setrunelocale.c b/lib/libc/locale/setrunelocale.c
index 3ffb649..927b200 100644
--- a/lib/libc/locale/setrunelocale.c
+++ b/lib/libc/locale/setrunelocale.c
@@ -73,9 +73,11 @@ static int __setrunelocale(struct xlocale_ctype *l, const char *);
#define __collate_chain_pri_table (table->__collate_chain_pri_table)
-static void destruct_ctype(void *v)
+static void
+destruct_ctype(void *v)
{
struct xlocale_ctype *l = v;
+
if (strcmp(l->runes->__encoding, "EUC") == 0)
free(l->runes->__variable);
if (&_DefaultRuneLocale != l->runes)
@@ -83,13 +85,17 @@ static void destruct_ctype(void *v)
free(l);
}
-const _RuneLocale *__getCurrentRuneLocale(void)
+const _RuneLocale *
+__getCurrentRuneLocale(void)
{
+
return XLOCALE_CTYPE(__get_locale())->runes;
}
-static void free_runes(_RuneLocale *rl)
+static void
+free_runes(_RuneLocale *rl)
{
+
/* FIXME: The "EUC" check here is a hideous abstraction violation. */
if ((rl != &_DefaultRuneLocale) && (rl)) {
if (strcmp(rl->__encoding, "EUC") == 0) {
@@ -191,7 +197,8 @@ __wrap_setrunelocale(const char *locale)
#ifndef __NO_TLS
void
-__set_thread_rune_locale(locale_t loc) {
+__set_thread_rune_locale(locale_t loc)
+{
if (loc == NULL) {
_ThreadRuneLocale = &_DefaultRuneLocale;
@@ -205,6 +212,7 @@ void *
__ctype_load(const char *locale, locale_t unused)
{
struct xlocale_ctype *l = calloc(sizeof(struct xlocale_ctype), 1);
+
l->header.header.destructor = destruct_ctype;
if (__setrunelocale(l, locale))
{
OpenPOWER on IntegriCloud