' This is file locale.bi
' (FreeBasic binding for C-library)
'
' (C) 2011 Thomas[ dot ]Freiherr[ at ]gmx[ dot ]net
' translated with help of h_2_bi.bas
' (http://www.freebasic-portal.de/downloads/ressourcencompiler/h2bi-bas-134.html)
'
' Licence:
' This library binding is free software; you can redistribute it
' and/or modify it under the terms of the GNU Lesser General Public
' License as published by the Free Software Foundation; either
' version 2 of the License, or (at your option) ANY later version.
'
' This binding is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
' Lesser General Public License for more details, refer to:
' http://www.gnu.org/licenses/lgpl.html
'
'
' Original license text:
'
'/* Copyright (C) 1991,1992,1995-2002,2007,2009 Free Software Foundation, Inc.
   'This file is part of the GNU C Library.

   'The GNU C Library is free software; you can redistribute it and/or
   'modify it under the terms of the GNU Lesser General Public
   'License as published by the Free Software Foundation; either
   'version 2.1 of the License, or (at your option) any later version.

   'The GNU C Library is distributed in the hope that it will be useful,
   'but WITHOUT ANY WARRANTY; without even the implied warranty of
   'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   'Lesser General Public License for more details.

   'You should have received a copy of the GNU Lesser General Public
   'License along with the GNU C Library; if not, write to the Free
   'Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
   '02111-1307 USA.  */

'/*
 '*  ISO C99 Standard: 7.11 Localization <locale.h>
 '*/

EXTERN "C"

#IFNDEF _LOCALE_H
#DEFINE _LOCALE_H 1

' file not found: features.h

#DEFINE __need_NULL
#INCLUDE ONCE "crt/stddef.bi" '__HEADERS__: stddef.h

#INCLUDE ONCE "bits/locale.bi"

#DEFINE LC_CTYPE __LC_CTYPE
#DEFINE LC_NUMERIC __LC_NUMERIC
#DEFINE LC_TIME __LC_TIME
#DEFINE LC_COLLATE __LC_COLLATE
#DEFINE LC_MONETARY __LC_MONETARY
#DEFINE LC_MESSAGES __LC_MESSAGES
#DEFINE LC_ALL __LC_ALL
#DEFINE LC_PAPER __LC_PAPER
#DEFINE LC_NAME __LC_NAME
#DEFINE LC_ADDRESS __LC_ADDRESS
#DEFINE LC_TELEPHONE __LC_TELEPHONE
#DEFINE LC_MEASUREMENT __LC_MEASUREMENT
#DEFINE LC_IDENTIFICATION __LC_IDENTIFICATION

TYPE lconv
  AS ZSTRING PTR decimal_point
  AS ZSTRING PTR thousands_sep
  AS ZSTRING PTR grouping
  AS ZSTRING PTR int_curr_symbol
  AS ZSTRING PTR currency_symbol
  AS ZSTRING PTR mon_decimal_point
  AS ZSTRING PTR mon_thousands_sep
  AS ZSTRING PTR mon_grouping
  AS ZSTRING PTR positive_sign
  AS ZSTRING PTR negative_sign
  AS UBYTE int_frac_digits
  AS UBYTE frac_digits
  AS UBYTE p_cs_precedes
  AS UBYTE p_sep_by_space
  AS UBYTE n_cs_precedes
  AS UBYTE n_sep_by_space
  AS UBYTE p_sign_posn
  AS UBYTE n_sign_posn
#IFDEF __USE_ISOC99
  AS UBYTE int_p_cs_precedes
  AS UBYTE int_p_sep_by_space
  AS UBYTE int_n_cs_precedes
  AS UBYTE int_n_sep_by_space
  AS UBYTE int_p_sign_posn
  AS UBYTE int_n_sign_posn
#ELSE ' __USE_ISOC99
  AS UBYTE __int_p_cs_precedes
  AS UBYTE __int_p_sep_by_space
  AS UBYTE __int_n_cs_precedes
  AS UBYTE __int_n_sep_by_space
  AS UBYTE __int_p_sign_posn
  AS UBYTE __int_n_sign_posn
#ENDIF ' __USE_ISOC99
END TYPE

DECLARE FUNCTION setlocale( BYVAL AS INTEGER, BYVAL AS CONST ZSTRING PTR) AS ZSTRING PTR
DECLARE FUNCTION localeconv() AS lconv PTR

#IFDEF __USE_XOPEN2K8

#INCLUDE ONCE "crt/xlocale.h"

DECLARE FUNCTION newlocale( BYVAL AS INTEGER, BYVAL AS __const ZSTRING PTR, BYVAL AS __locale_t) AS __locale_t

#DEFINE LC_CTYPE_MASK (1 SHL __LC_CTYPE)
#DEFINE LC_NUMERIC_MASK (1 SHL __LC_NUMERIC)
#DEFINE LC_TIME_MASK (1 SHL __LC_TIME)
#DEFINE LC_COLLATE_MASK (1 SHL __LC_COLLATE)
#DEFINE LC_MONETARY_MASK (1 SHL __LC_MONETARY)
#DEFINE LC_MESSAGES_MASK (1 SHL __LC_MESSAGES)
#DEFINE LC_PAPER_MASK (1 SHL __LC_PAPER)
#DEFINE LC_NAME_MASK (1 SHL __LC_NAME)
#DEFINE LC_ADDRESS_MASK (1 SHL __LC_ADDRESS)
#DEFINE LC_TELEPHONE_MASK (1 SHL __LC_TELEPHONE)
#DEFINE LC_MEASUREMENT_MASK (1 SHL __LC_MEASUREMENT)
#DEFINE LC_IDENTIFICATION_MASK (1 SHL __LC_IDENTIFICATION)
#DEFINE LC_ALL_MASK (LC_CTYPE_MASK _
         OR LC_NUMERIC_MASK _
         OR LC_TIME_MASK _
         OR LC_COLLATE_MASK _
         OR LC_MONETARY_MASK _
         OR LC_MESSAGES_MASK _
         OR LC_PAPER_MASK _
         OR LC_NAME_MASK _
         OR LC_ADDRESS_MASK _
         OR LC_TELEPHONE_MASK _
         OR LC_MEASUREMENT_MASK _
         OR LC_IDENTIFICATION_MASK _
         )

DECLARE FUNCTION duplocale( BYVAL AS __locale_t) AS __locale_t
DECLARE FUNCTION freelocale( BYVAL AS __locale_t)
DECLARE FUNCTION uselocale( BYVAL AS __locale_t) AS __locale_t

#DEFINE LC_GLOBAL_LOCALE (CAST(__locale_t, -1L)
#ENDIF ' __USE_XOPEN2K8

END EXTERN

#ENDIF ' _LOCALE_H
