diff options
author | phantom <phantom@FreeBSD.org> | 2001-12-20 18:28:52 +0000 |
---|---|---|
committer | phantom <phantom@FreeBSD.org> | 2001-12-20 18:28:52 +0000 |
commit | 7c6189a9880a4be6a3aee1691f9a6bfdbbb04182 (patch) | |
tree | 9f41fbde0521c0de7fed53615f28db5f82d01285 /lib/libc/locale/ldpart.c | |
parent | 1ae32ba9c3d98f0bd96d2117a70f4850df271529 (diff) | |
download | FreeBSD-src-7c6189a9880a4be6a3aee1691f9a6bfdbbb04182.zip FreeBSD-src-7c6189a9880a4be6a3aee1691f9a6bfdbbb04182.tar.gz |
style(9)'ify
Diffstat (limited to 'lib/libc/locale/ldpart.c')
-rw-r--r-- | lib/libc/locale/ldpart.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/lib/libc/locale/ldpart.c b/lib/libc/locale/ldpart.c index 9cc8046..b29ba9e 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; |