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