* Add my e-mail to copyrights

* style(9)'ify
This commit is contained in:
Alexey Zelkin 2001-12-11 15:55:42 +00:00
parent b21656a8f4
commit 74f2b97544
10 changed files with 57 additions and 52 deletions

View file

@ -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);

View file

@ -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

View file

@ -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);
}

View file

@ -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);

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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
*/