mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Export internal data structures in same manner as numeric/monetary/messages
structures exported. Protect timelocal.h from multiple inclusions.
This commit is contained in:
parent
e690a5563f
commit
18f3e1e400
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=72167
@ -44,8 +44,8 @@
|
||||
static int split_lines(char *, const char *);
|
||||
static void set_from_buf(const char *, int);
|
||||
|
||||
struct lc_time_T _time_localebuf;
|
||||
int _time_using_locale;
|
||||
static struct lc_time_T _time_localebuf;
|
||||
static int _time_using_locale;
|
||||
|
||||
#define LCTIME_SIZE_FULL (sizeof(struct lc_time_T) / sizeof(char *))
|
||||
#define LCTIME_SIZE_1 \
|
||||
@ -53,7 +53,7 @@ int _time_using_locale;
|
||||
#define LCTIME_SIZE_2 \
|
||||
(offsetof(struct lc_time_T, Ef_fmt) / sizeof(char *))
|
||||
|
||||
const struct lc_time_T _C_time_locale = {
|
||||
static const struct lc_time_T _C_time_locale = {
|
||||
{
|
||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
|
||||
@ -111,6 +111,12 @@ const struct lc_time_T _C_time_locale = {
|
||||
"%B %e"
|
||||
};
|
||||
|
||||
struct lc_time_T *
|
||||
__get_current_time_locale(void) {
|
||||
return (_time_using_locale
|
||||
? &_time_localebuf
|
||||
: (struct lc_time_T *)&_C_time_locale);
|
||||
}
|
||||
|
||||
int
|
||||
__time_load_locale(const char *name)
|
||||
|
@ -26,6 +26,9 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _TIMELOCAL_H
|
||||
#define _TIMELOCAL_H
|
||||
|
||||
/*
|
||||
* Private header file for the strftime and strptime localization
|
||||
* stuff.
|
||||
@ -46,9 +49,6 @@ struct lc_time_T {
|
||||
const char * EF_fmt;
|
||||
};
|
||||
|
||||
extern struct lc_time_T _time_localebuf;
|
||||
extern int _time_using_locale;
|
||||
extern const struct lc_time_T _C_time_locale;
|
||||
|
||||
#define Locale (_time_using_locale ? &_time_localebuf : &_C_time_locale)
|
||||
struct lc_time_T * __get_current_time_locale(void);
|
||||
|
||||
#endif /* _TIMELOCAL_H */
|
||||
|
Loading…
Reference in New Issue
Block a user