initial locale support
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1705 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
4555e63fe4
commit
952977a190
@ -2,6 +2,7 @@ SubDir OBOS_TOP src kernel libroot posix locale ;
|
||||
|
||||
KernelObjects
|
||||
<$(SOURCE_GRIST)>ctype.c
|
||||
<$(SOURCE_GRIST)>localeconv.c
|
||||
:
|
||||
-fPIC -DPIC
|
||||
;
|
||||
|
57
src/kernel/libroot/posix/locale/localeconv.c
Normal file
57
src/kernel/libroot/posix/locale/localeconv.c
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (c) 2002, OpenBeOS Project.
|
||||
* All rights reserved.
|
||||
* Distributed under the terms of the OpenBeOS license.
|
||||
*
|
||||
*
|
||||
* localeconv.c:
|
||||
* defines the structure containing the current locale
|
||||
* and the single access function 'localeconv()'
|
||||
*
|
||||
*
|
||||
* Author(s):
|
||||
* Daniel Reinhold (danielre@users.sf.net)
|
||||
*
|
||||
*/
|
||||
|
||||
#include <locale.h>
|
||||
#include <limits.h>
|
||||
|
||||
|
||||
/*
|
||||
* the values below initialize the struct to the "C" locale
|
||||
* which is the default (and only required) locale
|
||||
*/
|
||||
|
||||
struct lconv _Locale = {
|
||||
".", // decimal point
|
||||
|
||||
"", // thousands separator
|
||||
"", // grouping
|
||||
"", // international currency symbol
|
||||
"", // local currency symbol
|
||||
"", // monetary decimal point
|
||||
"", // monetary thousands separator
|
||||
"", // monetary grouping
|
||||
"", // positive sign
|
||||
"", // negative sign
|
||||
|
||||
CHAR_MAX, // int_frac_digits
|
||||
CHAR_MAX, // frac_digits
|
||||
CHAR_MAX, // p_cs_precedes
|
||||
CHAR_MAX, // p_sep_by_space
|
||||
CHAR_MAX, // n_cs_precedes
|
||||
CHAR_MAX, // n_sep_by_space
|
||||
CHAR_MAX, // p_sign_posn
|
||||
CHAR_MAX // n_sign_posn
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct lconv *
|
||||
localeconv(void)
|
||||
{
|
||||
// return pointer to the current locale
|
||||
return &_Locale;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user