145e5710bSMark Peek /* $Header: /p/tcsh/cvsroot/tcsh/tc.nls.h,v 3.13 2006/02/14 14:07:36 christos Exp $ */ 223338178SMark Peek /* 323338178SMark Peek * tc.nls.h: NLS support 423338178SMark Peek * 523338178SMark Peek */ 623338178SMark Peek /*- 723338178SMark Peek * Copyright (c) 1980, 1991 The Regents of the University of California. 823338178SMark Peek * All rights reserved. 923338178SMark Peek * 1023338178SMark Peek * Redistribution and use in source and binary forms, with or without 1123338178SMark Peek * modification, are permitted provided that the following conditions 1223338178SMark Peek * are met: 1323338178SMark Peek * 1. Redistributions of source code must retain the above copyright 1423338178SMark Peek * notice, this list of conditions and the following disclaimer. 1523338178SMark Peek * 2. Redistributions in binary form must reproduce the above copyright 1623338178SMark Peek * notice, this list of conditions and the following disclaimer in the 1723338178SMark Peek * documentation and/or other materials provided with the distribution. 1823338178SMark Peek * 3. Neither the name of the University nor the names of its contributors 1923338178SMark Peek * may be used to endorse or promote products derived from this software 2023338178SMark Peek * without specific prior written permission. 2123338178SMark Peek * 2223338178SMark Peek * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2323338178SMark Peek * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2423338178SMark Peek * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2523338178SMark Peek * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2623338178SMark Peek * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2723338178SMark Peek * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2823338178SMark Peek * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2923338178SMark Peek * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3023338178SMark Peek * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3123338178SMark Peek * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3223338178SMark Peek * SUCH DAMAGE. 3323338178SMark Peek */ 3423338178SMark Peek #ifndef _h_tc_nls 3523338178SMark Peek #define _h_tc_nls 3623338178SMark Peek 3723338178SMark Peek #include "sh.h" 3823338178SMark Peek 3923338178SMark Peek #ifdef WIDE_STRINGS 4045e5710bSMark Peek extern int NLSWidth(Char); 4145e5710bSMark Peek extern int NLSStringWidth (const Char *); 4223338178SMark Peek #else 4323338178SMark Peek # define NLSStringWidth(s) Strlen(s) 4423338178SMark Peek # define NLSWidth(c) 1 4523338178SMark Peek #endif 4623338178SMark Peek 4745e5710bSMark Peek extern Char *NLSChangeCase (const Char *, int); 4845e5710bSMark Peek extern int NLSClassify (Char, int); 4923338178SMark Peek 5023338178SMark Peek #define NLSCLASS_CTRL (-1) 5123338178SMark Peek #define NLSCLASS_TAB (-2) 5223338178SMark Peek #define NLSCLASS_NL (-3) 5323338178SMark Peek #define NLSCLASS_ILLEGAL (-4) 5423338178SMark Peek #define NLSCLASS_ILLEGAL2 (-5) 5523338178SMark Peek #define NLSCLASS_ILLEGAL3 (-6) 5623338178SMark Peek #define NLSCLASS_ILLEGAL4 (-7) 5723338178SMark Peek 5823338178SMark Peek #define NLSCLASS_ILLEGAL_SIZE(x) (-(x) - (-(NLSCLASS_ILLEGAL) - 1)) 5923338178SMark Peek 6023338178SMark Peek #endif 61