3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering/***********************************************************************
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering* This software is part of the ast package *
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering* Copyright (c) 1985-2011 AT&T Intellectual Property *
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering* and is licensed under the *
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering* Eclipse Public License, Version 1.0 *
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering* by AT&T Intellectual Property *
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering* A copy of the License is available at *
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering* http://www.eclipse.org/org/documents/epl-v10.html *
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering* Information and Software Systems Research *
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering* AT&T Research *
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering* Florham Park NJ *
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering* Glenn Fowler <gsf@research.att.com> *
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering* David Korn <dgk@research.att.com> *
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering* Phong Vo <kpv@research.att.com> *
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering***********************************************************************/
4871690d9e32608bbd9b18505b5326c2079c9690Allin Cottrell * Glenn Fowler
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering * AT&T Research
6bedfcbb2970e06a4d3280c8fb62083d252ede73Lennart Poettering * time conversion translation support
ad79565d6b37bcc93cf773a39b975e5b85d122daUmut Tezduyar Lindskog * this is unix dadgummit
ad79565d6b37bcc93cf773a39b975e5b85d122daUmut Tezduyar Lindskogstandardized(Lc_info_t* li, register char** b)
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering if ((li->lc->language->flags & (LC_debug|LC_default)) || streq(li->lc->language->code, "en"))
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering * fix up LC_TIME data after loading
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering register char** v;
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering register char** e;
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering register int n;
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering for (v = b, e = b + TM_NFORM; v < e; v++)
3b7124a8db56ed57525b9ecfd19cfdc8c9facba0Lennart Poettering for (n = 0; n < TM_NFORM; n++)
#if _WINIX
#include <ast_windows.h>
#undef extern
s = (char*)(b + TM_NFORM);
goto bad;
goto bad;
goto bad;
goto bad;
b[TM_TIME] = s;
if (!leading_0)
for (t = buf; *s = *t++; s++);
if (!leading_0)
for (t = buf; *s = *t++; s++);
if (!leading_0)
goto bad;
b[TM_DATE] = s;
goto bad;
b[TM_DEFAULT] = s;
bad:
free(b);
#if _hdr_nl_types
#include <nl_types.h>
#include <langinfo.h>
#ifdef _DATE_FMT
#ifdef ERA
#ifdef ALT_DIGITS
s = (char*)(b + TM_NFORM);
#define native_lc_time(li) ((li->data=(void*)(tm_info.format=tm_data.format)),(tm_info.deformat=tm_info.format[TM_DEFAULT]))
ssize_t n;
tp = 0;
if (!tp)
e = b + TM_NFORM;
free(b);
if (tp)