2000-02-08 16:57:01 +01:00
|
|
|
/* -----------------------------------------------------------------------
|
2000-01-07 18:22:47 +01:00
|
|
|
* pg_locale.h
|
|
|
|
*
|
2000-11-25 23:43:08 +01:00
|
|
|
* The PostgreSQL locale utils.
|
2000-01-07 18:22:47 +01:00
|
|
|
*
|
|
|
|
*
|
2001-10-25 07:50:21 +02:00
|
|
|
* $Id: pg_locale.h,v 1.9 2001/10/25 05:50:10 momjian Exp $
|
2000-02-08 16:57:01 +01:00
|
|
|
*
|
2001-01-24 20:43:33 +01:00
|
|
|
* Portions Copyright (c) 1999-2000, PostgreSQL Global Development Group
|
2000-02-08 16:57:01 +01:00
|
|
|
*
|
|
|
|
* Karel Zak - Zakkr
|
|
|
|
*
|
|
|
|
* -----------------------------------------------------------------------
|
|
|
|
*/
|
2000-04-12 19:17:23 +02:00
|
|
|
|
|
|
|
#ifndef _PG_LOCALE_
|
|
|
|
#define _PG_LOCALE_
|
|
|
|
|
|
|
|
#ifdef USE_LOCALE
|
|
|
|
|
2000-01-07 18:22:47 +01:00
|
|
|
/*------
|
|
|
|
* POSIX locale categories and environment variable LANG
|
|
|
|
*------
|
|
|
|
*/
|
2000-04-12 19:17:23 +02:00
|
|
|
typedef struct PG_LocaleCategories
|
|
|
|
{
|
|
|
|
char *lang,
|
|
|
|
*lc_ctype,
|
|
|
|
*lc_numeric,
|
|
|
|
*lc_time,
|
|
|
|
*lc_collate,
|
|
|
|
*lc_monetary,
|
|
|
|
*lc_messages;
|
2001-10-25 07:50:21 +02:00
|
|
|
} PG_LocaleCategories;
|
2000-01-07 18:22:47 +01:00
|
|
|
|
2001-09-29 23:16:30 +02:00
|
|
|
/*
|
2001-10-25 07:50:21 +02:00
|
|
|
* Save locale category settings into PG memory
|
2001-09-29 23:16:30 +02:00
|
|
|
*/
|
2001-10-25 07:50:21 +02:00
|
|
|
extern void PGLC_current(PG_LocaleCategories *lc);
|
|
|
|
|
2001-09-29 23:16:30 +02:00
|
|
|
/*
|
|
|
|
* Free memory allocated in PGLC_current()
|
|
|
|
*/
|
2001-10-25 07:50:21 +02:00
|
|
|
extern void PGLC_free_categories(PG_LocaleCategories *lc);
|
2000-01-07 18:22:47 +01:00
|
|
|
|
|
|
|
/*------
|
|
|
|
* Return the POSIX lconv struct (contains number/money formatting information)
|
2001-03-22 05:01:46 +01:00
|
|
|
* with locale information for all categories. Note that returned lconv
|
2000-11-25 23:43:08 +01:00
|
|
|
* does not depend on currently active category settings, but on external
|
|
|
|
* environment variables for locale.
|
2000-01-07 18:22:47 +01:00
|
|
|
*------
|
|
|
|
*/
|
2000-03-18 19:57:16 +01:00
|
|
|
extern struct lconv *PGLC_localeconv(void);
|
2000-01-07 18:22:47 +01:00
|
|
|
|
2000-04-12 19:17:23 +02:00
|
|
|
#endif /* USE_LOCALE */
|
|
|
|
#endif /* _PG_LOCALE_ */
|