summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphantom <phantom@FreeBSD.org>2001-12-11 15:55:42 +0000
committerphantom <phantom@FreeBSD.org>2001-12-11 15:55:42 +0000
commitf3ed7361342301c866a8d105912aa6f104ffc8b4 (patch)
treec62a1177cbccca85d9a4ab689c4715da8c827bad
parentcdb5aff0aa9a9eb36e9553221a2c5949131c95d9 (diff)
downloadFreeBSD-src-f3ed7361342301c866a8d105912aa6f104ffc8b4.zip
FreeBSD-src-f3ed7361342301c866a8d105912aa6f104ffc8b4.tar.gz
* Add my e-mail to copyrights
* style(9)'ify
-rw-r--r--lib/libc/locale/ldpart.c15
-rw-r--r--lib/libc/locale/ldpart.h2
-rw-r--r--lib/libc/locale/lmessages.c14
-rw-r--r--lib/libc/locale/lmessages.h12
-rw-r--r--lib/libc/locale/lmonetary.c36
-rw-r--r--lib/libc/locale/lmonetary.h2
-rw-r--r--lib/libc/locale/lnumeric.c18
-rw-r--r--lib/libc/locale/lnumeric.h2
-rw-r--r--lib/libc/locale/nl_langinfo.32
-rw-r--r--lib/libc/locale/nl_langinfo.c6
10 files changed, 57 insertions, 52 deletions
diff --git a/lib/libc/locale/ldpart.c b/lib/libc/locale/ldpart.c
index a55a8b7..9cc8046 100644
--- a/lib/libc/locale/ldpart.c
+++ b/lib/libc/locale/ldpart.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2001 Alexey Zelkin
+ * Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -35,6 +35,7 @@
#include <string.h>
#include <unistd.h>
#include "un-namespace.h"
+
#include "setlocale.h"
#include "ldpart.h"
@@ -73,8 +74,8 @@ __part_load_locale(const char *name,
return 0;
/*
- ** If the locale name is the same as our cache, use the cache.
- */
+ * If the locale name is the same as our cache, use the cache.
+ */
lbuf = locale_buf;
if (lbuf != NULL && strcmp(name, lbuf) == 0) {
set_from_buf(lbuf, num_lines, dst_localebuf);
@@ -82,8 +83,8 @@ __part_load_locale(const char *name,
return 0;
}
/*
- ** Slurp the locale file into the cache.
- */
+ * Slurp the locale file into the cache.
+ */
namesize = strlen(name) + 1;
if (!_PathLocale)
@@ -115,8 +116,8 @@ __part_load_locale(const char *name,
if (_close(fd) != 0)
goto bad_lbuf;
/*
- ** Parse the locale file into localebuf.
- */
+ * Parse the locale file into localebuf.
+ */
if (plim[-1] != '\n')
goto bad_lbuf;
num_lines = split_lines(p, plim);
diff --git a/lib/libc/locale/ldpart.h b/lib/libc/locale/ldpart.h
index b0c8b55..78149f9 100644
--- a/lib/libc/locale/ldpart.h
+++ b/lib/libc/locale/ldpart.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2001 Alexey Zelkin
+ * Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/lib/libc/locale/lmessages.c b/lib/libc/locale/lmessages.c
index a9bdf5b..4dcd719 100644
--- a/lib/libc/locale/lmessages.c
+++ b/lib/libc/locale/lmessages.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001 Alexey Zelkin
+ * Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -46,19 +46,21 @@ static const struct lc_messages_T _C_messages_locale = {
static struct lc_messages_T _messages_locale;
static int _messages_using_locale;
-static char * messages_locale_buf;
+static char *_messages_locale_buf;
int
__messages_load_locale(const char *name) {
- /* Propose that we can have incomplete locale file (w/o "{yes,no}str").
- Initialize them before loading. In case of complete locale, they'll
- be initialized to loaded value, otherwise they'll not be touched. */
+ /*
+ * Propose that we can have incomplete locale file (w/o "{yes,no}str").
+ * Initialize them before loading. In case of complete locale, they'll
+ * be initialized to loaded value, otherwise they'll not be touched.
+ */
_messages_locale.yesstr = empty;
_messages_locale.nostr = empty;
return __part_load_locale(name, &_messages_using_locale,
- messages_locale_buf, "LC_MESSAGES",
+ _messages_locale_buf, "LC_MESSAGES",
LCMESSAGES_SIZE_FULL, LCMESSAGES_SIZE_MIN,
(const char **)&_messages_locale);
}
diff --git a/lib/libc/locale/lmessages.h b/lib/libc/locale/lmessages.h
index 8102644..363d278 100644
--- a/lib/libc/locale/lmessages.h
+++ b/lib/libc/locale/lmessages.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2001 Alexey Zelkin
+ * Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,11 +29,11 @@
#ifndef _LMESSAGES_H
#define _LMESSAGES_H
-struct lc_messages_T {
- const char * yesexpr;
- const char * noexpr;
- const char * yesstr;
- const char * nostr;
+struct lc_messages_T {
+ const char *yesexpr;
+ const char *noexpr;
+ const char *yesstr;
+ const char *nostr;
};
extern struct lc_messages_T * __get_current_messages_locale(void);
diff --git a/lib/libc/locale/lmonetary.c b/lib/libc/locale/lmonetary.c
index 4ddc491..f4727b8 100644
--- a/lib/libc/locale/lmonetary.c
+++ b/lib/libc/locale/lmonetary.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2001 Alexey Zelkin
+ * Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,29 +36,29 @@ extern const char * __fix_locale_grouping_str(const char *);
#define LCMONETARY_SIZE (sizeof(struct lc_monetary_T) / sizeof(char *))
static char empty[] = "";
-static char numempty[] = { CHAR_MAX, '\0'};
+static char numempty[] = { CHAR_MAX, '\0'};
static const struct lc_monetary_T _C_monetary_locale = {
- empty , /* int_curr_symbol */
- empty , /* currency_symbol */
- empty , /* mon_decimal_point */
- empty , /* mon_thousands_sep */
- numempty , /* mon_grouping */
- empty , /* positive_sign */
- empty , /* negative_sign */
- numempty , /* int_frac_digits */
- numempty , /* frac_digits */
- numempty , /* p_cs_precedes */
- numempty , /* p_sep_by_space */
- numempty , /* n_cs_precedes */
- numempty , /* n_sep_by_space */
- numempty , /* p_sign_posn */
+ empty, /* int_curr_symbol */
+ empty, /* currency_symbol */
+ empty, /* mon_decimal_point */
+ empty, /* mon_thousands_sep */
+ numempty, /* mon_grouping */
+ empty, /* positive_sign */
+ empty, /* negative_sign */
+ numempty, /* int_frac_digits */
+ numempty, /* frac_digits */
+ numempty, /* p_cs_precedes */
+ numempty, /* p_sep_by_space */
+ numempty, /* n_cs_precedes */
+ numempty, /* n_sep_by_space */
+ numempty, /* p_sign_posn */
numempty /* n_sign_posn */
};
static struct lc_monetary_T _monetary_locale;
static int _monetary_using_locale;
-static char * monetary_locale_buf;
+static char *_monetary_locale_buf;
int
__monetary_load_locale(const char *name) {
@@ -66,7 +66,7 @@ __monetary_load_locale(const char *name) {
int ret;
__mlocale_changed = 1;
ret = __part_load_locale(name, &_monetary_using_locale,
- monetary_locale_buf, "LC_MONETARY",
+ _monetary_locale_buf, "LC_MONETARY",
LCMONETARY_SIZE, LCMONETARY_SIZE,
(const char **)&_monetary_locale);
if (ret == 0 && _monetary_using_locale)
diff --git a/lib/libc/locale/lmonetary.h b/lib/libc/locale/lmonetary.h
index a248fad..75c878c 100644
--- a/lib/libc/locale/lmonetary.h
+++ b/lib/libc/locale/lmonetary.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2001 Alexey Zelkin
+ * Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/lib/libc/locale/lnumeric.c b/lib/libc/locale/lnumeric.c
index e74321a..eb6015a 100644
--- a/lib/libc/locale/lnumeric.c
+++ b/lib/libc/locale/lnumeric.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2001 Alexey Zelkin
+ * Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,21 +31,21 @@
#include "ldpart.h"
extern int __nlocale_changed;
-extern const char * __fix_locale_grouping_str(const char *);
+extern const char *__fix_locale_grouping_str(const char *);
#define LCNUMERIC_SIZE (sizeof(struct lc_numeric_T) / sizeof(char *))
-static char numempty[] = { CHAR_MAX, '\0' };
+static char numempty[] = { CHAR_MAX, '\0' };
static const struct lc_numeric_T _C_numeric_locale = {
- ".", /* decimal_point */
- "", /* thousands_sep */
- numempty /* grouping */
+ ".", /* decimal_point */
+ "", /* thousands_sep */
+ numempty /* grouping */
};
static struct lc_numeric_T _numeric_locale;
-static int _numeric_using_locale;
-static char * numeric_locale_buf;
+static int _numeric_using_locale;
+static char *_numeric_locale_buf;
int
__numeric_load_locale(const char *name) {
@@ -54,7 +54,7 @@ __numeric_load_locale(const char *name) {
__nlocale_changed = 1;
ret = __part_load_locale(name, &_numeric_using_locale,
- numeric_locale_buf, "LC_NUMERIC",
+ _numeric_locale_buf, "LC_NUMERIC",
LCNUMERIC_SIZE, LCNUMERIC_SIZE,
(const char **)&_numeric_locale);
if (ret == 0 && _numeric_using_locale)
diff --git a/lib/libc/locale/lnumeric.h b/lib/libc/locale/lnumeric.h
index 5dcfefd..dde6cf3 100644
--- a/lib/libc/locale/lnumeric.h
+++ b/lib/libc/locale/lnumeric.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2001 Alexey Zelkin
+ * Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/lib/libc/locale/nl_langinfo.3 b/lib/libc/locale/nl_langinfo.3
index 66d7415..3b193f6 100644
--- a/lib/libc/locale/nl_langinfo.3
+++ b/lib/libc/locale/nl_langinfo.3
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2001 Alexey Zelkin
+.\" Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
diff --git a/lib/libc/locale/nl_langinfo.c b/lib/libc/locale/nl_langinfo.c
index 86b77bd..541cdd4 100644
--- a/lib/libc/locale/nl_langinfo.c
+++ b/lib/libc/locale/nl_langinfo.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2001 Alexey Zelkin
+ * Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,6 +31,7 @@
#include <limits.h>
#include <stdlib.h>
#include <string.h>
+
#include "../stdtime/timelocal.h"
#include "lnumeric.h"
#include "lmonetary.h"
@@ -152,7 +153,8 @@ nl_langinfo(nl_item item) {
case NOEXPR:
ret = (char*) __get_current_messages_locale()->noexpr;
break;
- /* All items marked with LEGACY are available, but not recomended
+ /*
+ * All items marked with LEGACY are available, but not recomended
* by SUSv2 to be used in portable applications since they're subject
* to remove in future specification editions
*/
OpenPOWER on IntegriCloud