1145479Smp/*
2145479Smp * tc.nls.h: NLS support
3145479Smp *
4145479Smp */
5145479Smp/*-
6145479Smp * Copyright (c) 1980, 1991 The Regents of the University of California.
7145479Smp * All rights reserved.
8145479Smp *
9145479Smp * Redistribution and use in source and binary forms, with or without
10145479Smp * modification, are permitted provided that the following conditions
11145479Smp * are met:
12145479Smp * 1. Redistributions of source code must retain the above copyright
13145479Smp *    notice, this list of conditions and the following disclaimer.
14145479Smp * 2. Redistributions in binary form must reproduce the above copyright
15145479Smp *    notice, this list of conditions and the following disclaimer in the
16145479Smp *    documentation and/or other materials provided with the distribution.
17145479Smp * 3. Neither the name of the University nor the names of its contributors
18145479Smp *    may be used to endorse or promote products derived from this software
19145479Smp *    without specific prior written permission.
20145479Smp *
21145479Smp * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22145479Smp * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23145479Smp * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24145479Smp * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25145479Smp * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26145479Smp * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27145479Smp * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28145479Smp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29145479Smp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30145479Smp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31145479Smp * SUCH DAMAGE.
32145479Smp */
33145479Smp#ifndef _h_tc_nls
34145479Smp#define _h_tc_nls
35145479Smp
36145479Smp#ifdef WIDE_STRINGS
37167465Smpextern int NLSWidth(Char);
38167465Smpextern int NLSStringWidth (const Char *);
39145479Smp#else
40167465Smp# define NLSStringWidth(s) Strlen(s)
41167465Smp# define NLSWidth(c) 1
42145479Smp#endif
43145479Smp
44167465Smpextern Char *NLSChangeCase (const Char *, int);
45316957Sdchaginextern int NLSClassify (Char, int, int);
46145479Smp
47145479Smp#define NLSCLASS_CTRL		(-1)
48145479Smp#define NLSCLASS_TAB		(-2)
49145479Smp#define NLSCLASS_NL		(-3)
50145479Smp#define NLSCLASS_ILLEGAL	(-4)
51145479Smp#define NLSCLASS_ILLEGAL2	(-5)
52145479Smp#define NLSCLASS_ILLEGAL3	(-6)
53145479Smp#define NLSCLASS_ILLEGAL4	(-7)
54316957Sdchagin#define NLSCLASS_ILLEGAL5	(-8)
55145479Smp
56145479Smp#define NLSCLASS_ILLEGAL_SIZE(x) (-(x) - (-(NLSCLASS_ILLEGAL) - 1))
57145479Smp
58145479Smp#endif
59