Deleted Added
full compact
timelocal.c (92986) timelocal.c (101471)
1/*-
2 * Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org>
3 * Copyright (c) 1997 FreeBSD Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org>
3 * Copyright (c) 1997 FreeBSD Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/lib/libc/stdtime/timelocal.c 92986 2002-03-22 21:53:29Z obrien $");
29__FBSDID("$FreeBSD: head/lib/libc/stdtime/timelocal.c 101471 2002-08-07 16:49:20Z ache $");
30
31#include <stddef.h>
32
33#include "ldpart.h"
34#include "timelocal.h"
35
36static struct lc_time_T _time_locale;
37static int _time_using_locale;

--- 57 unchanged lines hidden (view full) ---

95
96 /* ampm_fmt
97 * To determine 12-hour clock format time (empty, if N/A)
98 */
99 "%I:%M:%S %p"
100};
101
102struct lc_time_T *
30
31#include <stddef.h>
32
33#include "ldpart.h"
34#include "timelocal.h"
35
36static struct lc_time_T _time_locale;
37static int _time_using_locale;

--- 57 unchanged lines hidden (view full) ---

95
96 /* ampm_fmt
97 * To determine 12-hour clock format time (empty, if N/A)
98 */
99 "%I:%M:%S %p"
100};
101
102struct lc_time_T *
103__get_current_time_locale(void) {
103__get_current_time_locale(void)
104{
104 return (_time_using_locale
105 ? &_time_locale
106 : (struct lc_time_T *)&_C_time_locale);
107}
108
109int
105 return (_time_using_locale
106 ? &_time_locale
107 : (struct lc_time_T *)&_C_time_locale);
108}
109
110int
110__time_load_locale(const char *name) {
111
112 int ret;
113
114 ret = __part_load_locale(name, &_time_using_locale,
111__time_load_locale(const char *name)
112{
113 return (__part_load_locale(name, &_time_using_locale,
115 time_locale_buf, "LC_TIME",
116 LCTIME_SIZE, LCTIME_SIZE,
114 time_locale_buf, "LC_TIME",
115 LCTIME_SIZE, LCTIME_SIZE,
117 (const char **)&_time_locale);
118
119 return (ret);
116 (const char **)&_time_locale));
120}
117}