1 /*
2  * These routines make using the international messages facilities easier.
3  *
4  * This interface could be applied to methods other than X/Open coding
5  * (VMS etc..)
6  *
7  * Copyright (c) 1994 University of Minnesota
8  */
9 
10 #ifndef GLOCALE_H
11 #define GLOCALE_H
12 
13 
14 #if defined(_XOPEN_SOURCE) || defined(_AIX) || defined(__osf__)
15 #  define GINTERNATIONAL
16 #endif
17 
18 #ifdef VMS
19 
20 #  define LC_ALL ""
21    void setlocale(char *, char *);
22    void rsetlocale(int);
23    char *Gtxt(char *, int);
24    int Gtxtopen(char *,int);
25    char *catgets(int, int, int, char *);
26 #  define A_LANGUAGE		    '\001'
27 #  define GINTERNATIONAL
28 #  define NL_SETD 0
29    typedef int nl_catd;
30 
31 #else /* Unix: */
32 
33 #  ifndef GINTERNATIONAL	/* Only use i18n routines if we're sure */
34 #    define Gtxtlocale(a,b)
35 #    define setlocale(a,b)
36 #    define Gtxtopen(a,b)
37 #    define Gtxt(a,b)	    a
38 #  else
39 #    include "compatible.h"
40 
41 #    if !defined(HAVE_LOCALE_H)
42 #      undef  NO_LOCALE
43 #      define NO_LOCALE
44 #      undef  NO_XPGCAT	 /** Can't use X/Open message catalogs **/
45 #      define NO_XPGCAT	 /** without setlocale()	       **/
46 #      define LC_ALL	0
47 #      define LC_MESSAGES	1
48 #    else
49 #      include <locale.h>
50 #    endif
51 
52 /** Figure out which systems have catopen() etal **/
53 #    if !defined(__svr4__) && !defined(_XOPEN_SOURCE) && !defined(_XOPEN_VERSION)
54 #      undef  NO_XPGCAT
55 #      define NO_XPGCAT
56 #    endif
57 
58 #    ifndef NO_XPGCAT
59 #      include <nl_types.h>
60 #    else
61        typedef int nl_catd;
62 #    endif
63 
64 #    ifndef NL_SETD
65 #      define NL_SETD 0		/* SunOS 4.1.3 with xpg2bin/cc compiler */
66 #    endif
67 
68      /*** Define some nice convenience routines ***/
69      /**  It would sure be nice to use gettext() routines... oh well...***/
70 
71      extern nl_catd Gcatd;
72 
73      char	*Gtxtlocale();
74      char	*Gtxt();
75      nl_catd	 Gtxtopen();
76 
77 #  endif /* GINTERNATIONAL */
78 #endif /* VMS */
79 #endif /* GLOCALE_H */
80 
81