diff options
author | Alexey Zelkin <phantom@FreeBSD.org> | 2001-12-20 18:28:52 +0000 |
---|---|---|
committer | Alexey Zelkin <phantom@FreeBSD.org> | 2001-12-20 18:28:52 +0000 |
commit | f43a321bf056a6ebc2b5617204f39fe35bede460 (patch) | |
tree | 9f41fbde0521c0de7fed53615f28db5f82d01285 | |
parent | 8bf402ad9177ed932290c7ab05ab2f94064591a1 (diff) | |
download | src-f43a321bf056a6ebc2b5617204f39fe35bede460.tar.gz src-f43a321bf056a6ebc2b5617204f39fe35bede460.zip |
style(9)'ify
Notes
Notes:
svn path=/head/; revision=88309
-rw-r--r-- | lib/libc/locale/collate.h | 18 | ||||
-rw-r--r-- | lib/libc/locale/ldpart.c | 37 | ||||
-rw-r--r-- | lib/libc/locale/ldpart.h | 12 | ||||
-rw-r--r-- | lib/libc/locale/lmessages.h | 12 | ||||
-rw-r--r-- | lib/libc/locale/lmonetary.h | 42 | ||||
-rw-r--r-- | lib/libc/locale/lnumeric.h | 18 | ||||
-rw-r--r-- | lib/libc/locale/setlocale.h | 11 |
7 files changed, 77 insertions, 73 deletions
diff --git a/lib/libc/locale/collate.h b/lib/libc/locale/collate.h index ae6317c3abed..05aeee9e22c9 100644 --- a/lib/libc/locale/collate.h +++ b/lib/libc/locale/collate.h @@ -27,8 +27,8 @@ * $FreeBSD$ */ -#ifndef COLLATE_H_INCLUDED -#define COLLATE_H_INCLUDED +#ifndef _COLLATE_H_ +#define _COLLATE_H_ #include <sys/cdefs.h> #include <sys/types.h> @@ -54,14 +54,14 @@ extern struct __collate_st_char_pri __collate_char_pri_table[UCHAR_MAX + 1]; extern struct __collate_st_chain_pri __collate_chain_pri_table[TABLE_SIZE]; __BEGIN_DECLS -u_char *__collate_strdup __P((u_char *)); -u_char *__collate_substitute __P((const u_char *)); -int __collate_load_tables __P((char *)); -void __collate_lookup __P((const u_char *, int *, int *, int *)); -int __collate_range_cmp __P((int, int)); +u_char *__collate_strdup __P((u_char *)); +u_char *__collate_substitute __P((const u_char *)); +int __collate_load_tables __P((char *)); +void __collate_lookup __P((const u_char *, int *, int *, int *)); +int __collate_range_cmp __P((int, int)); #ifdef COLLATE_DEBUG -void __collate_print_tables __P((void)); +void __collate_print_tables __P((void)); #endif __END_DECLS -#endif /* not COLLATE_H_INCLUDED */ +#endif /* !_COLLATE_H_ */ diff --git a/lib/libc/locale/ldpart.c b/lib/libc/locale/ldpart.c index 9cc80462ed99..b29ba9e4070e 100644 --- a/lib/libc/locale/ldpart.c +++ b/lib/libc/locale/ldpart.c @@ -44,9 +44,9 @@ static void set_from_buf(const char *, int, const char **); int __part_load_locale(const char *name, - int* using_locale, + int *using_locale, char *locale_buf, - const char *category_name, + const char *category_filename, int locale_buf_size_max, int locale_buf_size_min, const char **dst_localebuf) { @@ -54,15 +54,15 @@ __part_load_locale(const char *name, static char locale_buf_C[] = "C"; static int num_lines; - int fd; - char * lbuf; - char * p; - const char * plim; - char filename[PATH_MAX]; - struct stat st; - size_t namesize; - size_t bufsize; - int save_using_locale; + int fd; + char *lbuf; + char *p; + const char *plim; + char filename[PATH_MAX]; + struct stat st; + size_t namesize; + size_t bufsize; + int save_using_locale; save_using_locale = *using_locale; *using_locale = 0; @@ -82,6 +82,7 @@ __part_load_locale(const char *name, *using_locale = 1; return 0; } + /* * Slurp the locale file into the cache. */ @@ -94,7 +95,7 @@ __part_load_locale(const char *name, strcat(filename, "/"); strcat(filename, name); strcat(filename, "/"); - strcat(filename, category_name); + strcat(filename, category_filename); fd = _open(filename, O_RDONLY); if (fd < 0) goto no_locale; @@ -129,8 +130,8 @@ __part_load_locale(const char *name, goto reset_locale; set_from_buf(lbuf, num_lines, dst_localebuf); /* - ** Record the successful parse in the cache. - */ + * Record the successful parse in the cache. + */ locale_buf = lbuf; *using_locale = 1; @@ -149,8 +150,8 @@ no_locale: } static int -split_lines(char *p, const char *plim) -{ +split_lines(char *p, const char *plim) { + int i; for (i = 0; p < plim; i++) { @@ -161,8 +162,8 @@ split_lines(char *p, const char *plim) } static void -set_from_buf(const char *p, int num_lines, const char **dst_localebuf) -{ +set_from_buf(const char *p, int num_lines, const char **dst_localebuf) { + const char **ap; int i; diff --git a/lib/libc/locale/ldpart.h b/lib/libc/locale/ldpart.h index 78149f97bb28..049ab56134f8 100644 --- a/lib/libc/locale/ldpart.h +++ b/lib/libc/locale/ldpart.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org> * All rights reserved. * @@ -26,10 +26,10 @@ * $FreeBSD$ */ -#ifndef _LDPART_H -#define _LDPART_H +#ifndef _LDPART_H_ +#define _LDPART_H_ -extern int __part_load_locale(const char *, int*, char *, const char *, - int, int, const char **); +int __part_load_locale(const char *, int*, char *, const char *, + int, int, const char **); -#endif /* _LDPART_H */ +#endif /* !_LDPART_H_ */ diff --git a/lib/libc/locale/lmessages.h b/lib/libc/locale/lmessages.h index 363d278b835a..41dcfa98ca6b 100644 --- a/lib/libc/locale/lmessages.h +++ b/lib/libc/locale/lmessages.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org> * All rights reserved. * @@ -26,8 +26,8 @@ * $FreeBSD$ */ -#ifndef _LMESSAGES_H -#define _LMESSAGES_H +#ifndef _LMESSAGES_H_ +#define _LMESSAGES_H_ struct lc_messages_T { const char *yesexpr; @@ -36,7 +36,7 @@ struct lc_messages_T { const char *nostr; }; -extern struct lc_messages_T * __get_current_messages_locale(void); -extern int __messages_load_locale(const char *); +struct lc_messages_T *__get_current_messages_locale(void); +int __messages_load_locale(const char *); -#endif /* _LMESSAGES_H */ +#endif /* !_LMESSAGES_H_ */ diff --git a/lib/libc/locale/lmonetary.h b/lib/libc/locale/lmonetary.h index 75c878ce23cc..d32689793922 100644 --- a/lib/libc/locale/lmonetary.h +++ b/lib/libc/locale/lmonetary.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org> * All rights reserved. * @@ -26,28 +26,28 @@ * $FreeBSD$ */ -#ifndef _LMONETARY_H -#define _LMONETARY_H +#ifndef _LMONETARY_H_ +#define _LMONETARY_H_ struct lc_monetary_T { - const char * int_curr_symbol; - const char * currency_symbol; - const char * mon_decimal_point; - const char * mon_thousands_sep; - const char * mon_grouping; - const char * positive_sign; - const char * negative_sign; - const char * int_frac_digits; - const char * frac_digits; - const char * p_cs_precedes; - const char * p_sep_by_space; - const char * n_cs_precedes; - const char * n_sep_by_space; - const char * p_sign_posn; - const char * n_sign_posn; + const char *int_curr_symbol; + const char *currency_symbol; + const char *mon_decimal_point; + const char *mon_thousands_sep; + const char *mon_grouping; + const char *positive_sign; + const char *negative_sign; + const char *int_frac_digits; + const char *frac_digits; + const char *p_cs_precedes; + const char *p_sep_by_space; + const char *n_cs_precedes; + const char *n_sep_by_space; + const char *p_sign_posn; + const char *n_sign_posn; }; -extern struct lc_monetary_T * __get_current_monetary_locale(void); -extern int __monetary_load_locale(const char *); +struct lc_monetary_T *__get_current_monetary_locale(void); +int __monetary_load_locale(const char *); -#endif /* _LMONETARY_H */ +#endif /* !_LMONETARY_H_ */ diff --git a/lib/libc/locale/lnumeric.h b/lib/libc/locale/lnumeric.h index dde6cf322055..cc6965b62cc7 100644 --- a/lib/libc/locale/lnumeric.h +++ b/lib/libc/locale/lnumeric.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org> * All rights reserved. * @@ -26,16 +26,16 @@ * $FreeBSD$ */ -#ifndef _LNUMERIC_H -#define _LNUMERIC_H +#ifndef _LNUMERIC_H_ +#define _LNUMERIC_H_ struct lc_numeric_T { - const char * decimal_point; - const char * thousands_sep; - const char * grouping; + const char *decimal_point; + const char *thousands_sep; + const char *grouping; }; -extern struct lc_numeric_T * __get_current_numeric_locale(void); -extern int __numeric_load_locale(const char *); +struct lc_numeric_T *__get_current_numeric_locale(void); +int __numeric_load_locale(const char *); -#endif /* _LNUMERIC_H */ +#endif /* !_LNUMERIC_H_ */ diff --git a/lib/libc/locale/setlocale.h b/lib/libc/locale/setlocale.h index f3b2a22eb763..9804f05f332c 100644 --- a/lib/libc/locale/setlocale.h +++ b/lib/libc/locale/setlocale.h @@ -1,6 +1,4 @@ -#ifndef _SETLOCALE_H -#define _SETLOCALE_H -/* +/*- * Copyright (C) 1997 by Andrey A. Chernov, Moscow, Russia. * All rights reserved. * @@ -24,11 +22,16 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ +#ifndef _SETLOCALE_H_ +#define _SETLOCALE_H_ + #define ENCODING_LEN 31 #define CATEGORY_LEN 11 extern char *_PathLocale; -#endif /* SETLOCALE_H */ +#endif /* !_SETLOCALE_H_ */ |