home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / libc / locale.h < prev    next >
Text File  |  1999-03-15  |  5KB  |  131 lines

  1. #if __IBMC__ || __IBMCPP__
  2. #pragma info( none )
  3. #ifndef __CHKHDR__
  4.    #pragma info( none )
  5. #endif
  6. #pragma info( restore )
  7. #endif
  8.  
  9. #ifndef     _H_LOCALE
  10.    #define _H_LOCALE
  11.  
  12.    #include <stddef.h>
  13.  
  14.    #ifdef __cplusplus
  15.       extern "C" {
  16.    #endif
  17.  
  18.    #ifndef  _LNK_CONV
  19.       #if __IBMC__ || __IBMCPP__ || defined(_OPTLINK_SUPPORTED)
  20.          #define _LNK_CONV   _Optlink
  21.       #else
  22.          #define _LNK_CONV
  23.       #endif
  24.    #endif
  25.  
  26.    #ifndef _IMPORT
  27.       #ifdef __IMPORTLIB__
  28.          #define _IMPORT _Import
  29.       #else
  30.          #define _IMPORT
  31.       #endif
  32.    #endif
  33.  
  34.    /********************************************************************/
  35.    /*  <locale.h> header file                                          */
  36.    /*                                                                  */
  37.    /*  (C) Copyright IBM Corp. 1991, 1995.                             */
  38.    /*  - Licensed Material - Program-Property of IBM                   */
  39.    /*  - All rights reserved                                           */
  40.    /*                                                                  */
  41.    /********************************************************************/
  42.  
  43.    #ifndef _ULS_UNIDEF
  44.       /* These definitions are duplicated in unidef.h. */
  45.       #define LC_ALL       (-1)
  46.       #define LC_COLLATE    0
  47.       #define LC_CTYPE      1
  48.       #define LC_NUMERIC    2
  49.       #define LC_MONETARY   3
  50.       #define LC_TIME       4
  51.       #define LC_MESSAGES   5
  52.    #endif
  53.  
  54.    #define LC_SYNTAX LC_CTYPE
  55.    #define LC_TOD LC_TIME
  56.  
  57.    /* Locales */
  58.  
  59.    #define LC_C          "C"
  60.    #define LC_C_GERMANY  "DE_DE"
  61.    #define LC_C_FRANCE   "FR_FR"
  62.    #define LC_C_UK       "EN_GB"
  63.    #define LC_C_ITALY    "IT_IT"
  64.    #define LC_C_SPAIN    "ES_ES"
  65.    #define LC_C_USA      "EN_US"
  66.  
  67.    #define LC_C_JAPAN    "JA_JP"
  68.    #define LC_C_JAPAN2   "JA_JP"
  69.    #define LC_C_JAPAN3   "JA_JP"
  70.    
  71.    typedef struct lconv {
  72.        char *decimal_point;      /* decimal point character             */
  73.        char *thousands_sep;      /* thousands separator                 */
  74.        char *grouping;           /* digit grouping                      */
  75.        char *int_curr_symbol;    /* international currency symbol       */
  76.        char *currency_symbol;    /* national currency symbol            */
  77.        char *mon_decimal_point;  /* currency decimal point              */
  78.        char *mon_thousands_sep;  /* currency thousands separator        */
  79.        char *mon_grouping;       /* currency digits grouping            */
  80.        char *positive_sign;      /* currency plus sign                  */
  81.        char *negative_sign;      /* currency minus sign                 */
  82.        char int_frac_digits;     /* internat currency fractional digits */
  83.        char frac_digits;         /* currency fractional digits          */
  84.        char p_cs_precedes;       /* currency plus location              */
  85.        char p_sep_by_space;      /* currency plus space ind.            */
  86.        char n_cs_precedes;       /* currency minus location             */
  87.        char n_sep_by_space;      /* currency minus space ind.           */
  88.        char p_sign_posn;         /* currency plus position              */
  89.        char n_sign_posn;         /* currency minus position             */
  90.        char *debit_sign;         /* non-neg-valued monetary sym - "DB"  */
  91.        char *credit_sign;        /* negative-valued monetary sym - "CR" */
  92.        char *left_parenthesis;   /* negative currency left paren        */
  93.        char *right_parenthesis;  /* negative currency right paren       */
  94.    } lconv;
  95.    
  96.    extern char         * _IMPORT _LNK_CONV setlocale( int, const char * );
  97.    extern struct lconv * _IMPORT _LNK_CONV localeconv( void );
  98.    char   *querylocaleenv(void);
  99.  
  100.    #ifdef __EXTENDED__
  101.       struct dtconv {
  102.             char *abbrev_month_names[12]; /* Abbreviated month names      */
  103.             char *month_names[12];        /* full month names             */
  104.             char *abbrev_day_names[7];    /* Abbreviated day names        */
  105.             char *day_names[7];           /* full day names               */
  106.             char *date_time_format;       /* date and time format         */
  107.             char *date_format;            /* date format                  */
  108.             char *time_format;            /* time format                  */
  109.             char *am_string;              /* AM string                    */
  110.             char *pm_string;              /* PM string                    */
  111.             char *time_format_ampm;       /* long date format             */
  112.       };
  113.  
  114.       struct dtconv * _IMPORT _LNK_CONV localdtconv(void);
  115.    #endif
  116.  
  117.    #ifdef __cplusplus
  118.       }
  119.    #endif
  120.  
  121. #endif
  122.  
  123. #if __IBMC__ || __IBMCPP__
  124. #pragma info( none )
  125. #ifndef __CHKHDR__
  126.    #pragma info( restore )
  127. #endif
  128. #pragma info( restore )
  129. #endif
  130.  
  131.