Listing 1 (locale.h)

/* locale.h standard header */
#ifndef _LOCALE
#define _LOCALE
     /* macros */
#define NULL_NULL
     /* locale codes */
#define LC_ALL     0
#define LC_COLLATE 1
#define LC_CTYPE   2
#define LC_MONETARY   3
#define LC_NUMERIC 4
#define LC_TIME    5
   /* ADD YOURS HERE */
#define _NCAT      6  /* one more than last */
     /* type definitions */
struct lconv  {
   struct lconv *_Next;
   const char *_Name;
     /* controlled by LC_CTYPE */
   const short *_Ctype;
   const short *_Tolower;
   const short *_Toupper;
     /* controlled by LC_MONETARY */
   char *currency_symbol;
   char *int_curr_symbol;
   char *mon_decimal_point;
   char *mon_grouping;
   char *mon _thousands_sep;
   char *negative_sign;
   char *positive_sign;
   char frac_digits;
   char int_frac_digits;
   char n_cs_precedes;
   char n_sep_by_space;
   char n_sign_posn;
   char p_cs_precedes;
   char p_sep_by_space;
   char p_sign_posn;
     /* controlled by LC_NUMERIC */
   char *decimal_point;
   char *grouping;
   char *thousands_sep;
   };
     /* declarations */
struct lconv *localeconv(void);
char *setlocale(int, const char *);
struct lconv *_Getloc(const char *, const char *);
struct lconv *_Setloc(int, struct lconv *);
extern struct 1conv _Clocale, _Locale;
     /* macro overrides */
#define localeconv() (&_Locale)
#endif