libroot/locale: Consolidate some headers.
No behavioral change intended.
This commit is contained in:
+12
-3
@@ -2,8 +2,11 @@
|
|||||||
* Copyright 2010, Oliver Tappe, zooey@hirschkaefer.de.
|
* Copyright 2010, Oliver Tappe, zooey@hirschkaefer.de.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef _POSIX_CTYPE_H
|
#ifndef _LOCALE_DATA_H
|
||||||
#define _POSIX_CTYPE_H
|
#define _LOCALE_DATA_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <locale.h>
|
||||||
|
|
||||||
|
|
||||||
namespace BPrivate {
|
namespace BPrivate {
|
||||||
@@ -22,9 +25,15 @@ extern const unsigned short gPosixClassInfo[384];
|
|||||||
extern const int gPosixToLowerMap[384];
|
extern const int gPosixToLowerMap[384];
|
||||||
extern const int gPosixToUpperMap[384];
|
extern const int gPosixToUpperMap[384];
|
||||||
|
|
||||||
|
extern const char* gPosixLanginfo[];
|
||||||
|
|
||||||
|
extern const struct lc_time_t gPosixLCTimeInfo;
|
||||||
|
|
||||||
|
extern struct lconv gPosixLocaleConv;
|
||||||
|
|
||||||
|
|
||||||
} // namespace Libroot
|
} // namespace Libroot
|
||||||
} // namespace BPrivate
|
} // namespace BPrivate
|
||||||
|
|
||||||
|
|
||||||
#endif // _POSIX_CTYPE_H
|
#endif // _LOCALE_DATA_H
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010, Oliver Tappe, [email protected].
|
|
||||||
* Distributed under the terms of the MIT License.
|
|
||||||
*/
|
|
||||||
#ifndef _POSIX_LANGINFO_H
|
|
||||||
#define _POSIX_LANGINFO_H
|
|
||||||
|
|
||||||
|
|
||||||
namespace BPrivate {
|
|
||||||
namespace Libroot {
|
|
||||||
|
|
||||||
|
|
||||||
extern const char* gPosixLanginfo[];
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace Libroot
|
|
||||||
} // namespace BPrivate
|
|
||||||
|
|
||||||
|
|
||||||
#endif // _POSIX_LANGINFO_H
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010, Oliver Tappe, [email protected].
|
|
||||||
* Distributed under the terms of the MIT License.
|
|
||||||
*/
|
|
||||||
#ifndef _POSIX_LOCALE_CONV_H
|
|
||||||
#define _POSIX_LOCALE_CONV_H
|
|
||||||
|
|
||||||
|
|
||||||
#include <locale.h>
|
|
||||||
|
|
||||||
|
|
||||||
namespace BPrivate {
|
|
||||||
namespace Libroot {
|
|
||||||
|
|
||||||
|
|
||||||
extern struct lconv gPosixLocaleConv;
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace Libroot
|
|
||||||
} // namespace BPrivate
|
|
||||||
|
|
||||||
|
|
||||||
#endif // _POSIX_LOCALE_CONV_H
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010, Oliver Tappe, [email protected].
|
|
||||||
* Distributed under the terms of the MIT License.
|
|
||||||
*/
|
|
||||||
#ifndef _POSIX_LC_TIME_INFO_H
|
|
||||||
#define _POSIX_LC_TIME_INFO_H
|
|
||||||
|
|
||||||
|
|
||||||
#include <timelocal.h>
|
|
||||||
|
|
||||||
|
|
||||||
namespace BPrivate {
|
|
||||||
namespace Libroot {
|
|
||||||
|
|
||||||
|
|
||||||
extern const struct lc_time_t gPosixLCTimeInfo;
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace Libroot
|
|
||||||
} // namespace BPrivate
|
|
||||||
|
|
||||||
|
|
||||||
#endif // _POSIX_LC_TIME_INFO_H
|
|
||||||
@@ -7,15 +7,13 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#include <PosixCtype.h>
|
|
||||||
#include <PosixLocaleConv.h>
|
|
||||||
|
|
||||||
#ifndef _KERNEL_MODE
|
#ifndef _KERNEL_MODE
|
||||||
#include <langinfo.h>
|
#include <langinfo.h>
|
||||||
#include <PosixLanginfo.h>
|
#include <timelocal.h>
|
||||||
#include <PosixLCTimeInfo.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <LocaleData.h>
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The values below initialize the structs for the "C"/"POSIX" locale
|
* The values below initialize the structs for the "C"/"POSIX" locale
|
||||||
|
|||||||
@@ -11,11 +11,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include <PosixCtype.h>
|
#include <LocaleData.h>
|
||||||
#include <PosixLanginfo.h>
|
|
||||||
#include <PosixLCTimeInfo.h>
|
|
||||||
#include <PosixLocaleConv.h>
|
|
||||||
#include <ThreadLocale.h>
|
|
||||||
|
|
||||||
|
|
||||||
extern const unsigned short* __ctype_b;
|
extern const unsigned short* __ctype_b;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
||||||
#include <LocaleBackend.h>
|
#include <LocaleBackend.h>
|
||||||
#include <PosixCtype.h>
|
#include <LocaleData.h>
|
||||||
|
|
||||||
|
|
||||||
namespace BPrivate {
|
namespace BPrivate {
|
||||||
@@ -21,9 +21,8 @@ GetClassInfoTable(locale_t l)
|
|||||||
{
|
{
|
||||||
LocaleBackendData* locale = (LocaleBackendData*)l;
|
LocaleBackendData* locale = (LocaleBackendData*)l;
|
||||||
|
|
||||||
if (locale->databridge == NULL) {
|
if (locale->databridge == NULL)
|
||||||
return &gPosixClassInfo[128];
|
return &gPosixClassInfo[128];
|
||||||
}
|
|
||||||
return *locale->databridge->ctypeDataBridge.addrOfClassInfoTable;
|
return *locale->databridge->ctypeDataBridge.addrOfClassInfoTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <PosixLocaleConv.h>
|
#include <LocaleData.h>
|
||||||
|
|
||||||
#ifndef _KERNEL_MODE
|
#ifndef _KERNEL_MODE
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
@@ -45,4 +45,4 @@ localeconv_l(locale_t l)
|
|||||||
|
|
||||||
return &BPrivate::Libroot::gPosixLocaleConv;
|
return &BPrivate::Libroot::gPosixLocaleConv;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -7,8 +7,7 @@
|
|||||||
#include <langinfo.h>
|
#include <langinfo.h>
|
||||||
|
|
||||||
#include "LocaleBackend.h"
|
#include "LocaleBackend.h"
|
||||||
|
#include "LocaleData.h"
|
||||||
#include <PosixLanginfo.h>
|
|
||||||
|
|
||||||
|
|
||||||
using BPrivate::Libroot::gPosixLanginfo;
|
using BPrivate::Libroot::gPosixLanginfo;
|
||||||
|
|||||||
Reference in New Issue
Block a user