(root)/
util-linux-2.39/
include/
nls.h
       1  /*
       2   * No copyright is claimed.  This code is in the public domain; do with
       3   * it what you wish.
       4   */
       5  #ifndef UTIL_LINUX_NLS_H
       6  #define UTIL_LINUX_NLS_H
       7  
       8  #ifndef LOCALEDIR
       9  #define LOCALEDIR "/usr/share/locale"
      10  #endif
      11  
      12  #ifdef HAVE_LOCALE_H
      13  # include <locale.h>
      14  #else
      15  # undef setlocale
      16  # define setlocale(Category, Locale) /* empty */
      17  struct lconv
      18  {
      19  	char *decimal_point;
      20  };
      21  # undef localeconv
      22  # define localeconv() NULL
      23  #endif
      24  
      25  
      26  #ifdef ENABLE_NLS
      27  # include <libintl.h>
      28  /*
      29   * For NLS support in the public shared libraries we have to specify text
      30   * domain name to be independent on the main program. For this purpose define
      31   * UL_TEXTDOMAIN_EXPLICIT before you include nls.h to your shared library code.
      32   */
      33  # ifdef UL_TEXTDOMAIN_EXPLICIT
      34  #  define _(Text) dgettext (UL_TEXTDOMAIN_EXPLICIT, Text)
      35  # else
      36  #  define _(Text) gettext (Text)
      37  # endif
      38  # ifdef gettext_noop
      39  #  define N_(String) gettext_noop (String)
      40  # else
      41  #  define N_(String) (String)
      42  # endif
      43  # define P_(Singular, Plural, n) ngettext (Singular, Plural, n)
      44  #else
      45  # undef bindtextdomain
      46  # define bindtextdomain(Domain, Directory) /* empty */
      47  # undef textdomain
      48  # define textdomain(Domain) /* empty */
      49  # define _(Text) (Text)
      50  # define N_(Text) (Text)
      51  # define P_(Singular, Plural, n) ((n) == 1 ? (Singular) : (Plural))
      52  #endif /* ENABLE_NLS */
      53  
      54  #ifdef HAVE_LANGINFO_H
      55  # include <langinfo.h>
      56  #else
      57  
      58  typedef int nl_item;
      59  extern char *langinfo_fallback(nl_item item);
      60  
      61  # define nl_langinfo	langinfo_fallback
      62  
      63  enum {
      64  	CODESET = 1,
      65  	RADIXCHAR,
      66  	THOUSEP,
      67  	D_T_FMT,
      68  	D_FMT,
      69  	T_FMT,
      70  	T_FMT_AMPM,
      71  	AM_STR,
      72  	PM_STR,
      73  
      74  	DAY_1,
      75  	DAY_2,
      76  	DAY_3,
      77  	DAY_4,
      78  	DAY_5,
      79  	DAY_6,
      80  	DAY_7,
      81  
      82  	ABDAY_1,
      83  	ABDAY_2,
      84  	ABDAY_3,
      85  	ABDAY_4,
      86  	ABDAY_5,
      87  	ABDAY_6,
      88  	ABDAY_7,
      89  
      90  	MON_1,
      91  	MON_2,
      92  	MON_3,
      93  	MON_4,
      94  	MON_5,
      95  	MON_6,
      96  	MON_7,
      97  	MON_8,
      98  	MON_9,
      99  	MON_10,
     100  	MON_11,
     101  	MON_12,
     102  
     103  	ABMON_1,
     104  	ABMON_2,
     105  	ABMON_3,
     106  	ABMON_4,
     107  	ABMON_5,
     108  	ABMON_6,
     109  	ABMON_7,
     110  	ABMON_8,
     111  	ABMON_9,
     112  	ABMON_10,
     113  	ABMON_11,
     114  	ABMON_12,
     115  
     116  	ERA_D_FMT,
     117  	ERA_D_T_FMT,
     118  	ERA_T_FMT,
     119  	ALT_DIGITS,
     120  	CRNCYSTR,
     121  	YESEXPR,
     122  	NOEXPR
     123  };
     124  
     125  #endif /* !HAVE_LANGINFO_H */
     126  
     127  #ifndef HAVE_LANGINFO_ALTMON
     128  # define ALTMON_1 MON_1
     129  # define ALTMON_2 MON_2
     130  # define ALTMON_3 MON_3
     131  # define ALTMON_4 MON_4
     132  # define ALTMON_5 MON_5
     133  # define ALTMON_6 MON_6
     134  # define ALTMON_7 MON_7
     135  # define ALTMON_8 MON_8
     136  # define ALTMON_9 MON_9
     137  # define ALTMON_10 MON_10
     138  # define ALTMON_11 MON_11
     139  # define ALTMON_12 MON_12
     140  #endif /* !HAVE_LANGINFO_ALTMON */
     141  
     142  #ifndef HAVE_LANGINFO_NL_ABALTMON
     143  # define _NL_ABALTMON_1 ABMON_1
     144  # define _NL_ABALTMON_2 ABMON_2
     145  # define _NL_ABALTMON_3 ABMON_3
     146  # define _NL_ABALTMON_4 ABMON_4
     147  # define _NL_ABALTMON_5 ABMON_5
     148  # define _NL_ABALTMON_6 ABMON_6
     149  # define _NL_ABALTMON_7 ABMON_7
     150  # define _NL_ABALTMON_8 ABMON_8
     151  # define _NL_ABALTMON_9 ABMON_9
     152  # define _NL_ABALTMON_10 ABMON_10
     153  # define _NL_ABALTMON_11 ABMON_11
     154  # define _NL_ABALTMON_12 ABMON_12
     155  #endif /* !HAVE_LANGINFO_NL_ABALTMON */
     156  
     157  #endif /* UTIL_LINUX_NLS_H */