about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/HTAssoc.c
Commit message (Expand)AuthorAgeFilesLines
* snapshot of project "lynx", label v2-8-9dev_11cThomas E. Dickey2016-11-241-3/+1
* snapshot of project "lynx", label v2-8-8dev_11Thomas E. Dickey2012-02-201-0/+84
* snapshot of project "lynx", label v2-8-8dev_10bThomas E. Dickey2012-02-201-84/+0
* snapshot of project "lynx", label v2-8-8dev_8mThomas E. Dickey2011-06-111-0/+84
* snapshot of project "lynx", label v2_8_8dev_9aThomas E. Dickey2011-06-111-84/+0
* snapshot of project "lynx", label v2-8-8dev_3cThomas E. Dickey2010-05-031-0/+84
* snapshot of project "lynx", label v2_8_8dev_6cThomas E. Dickey2010-04-291-82/+0
* snapshot of project "lynx", label v2-8-7dev_12bThomas E. Dickey2009-01-031-3/+5
* snapshot of project "lynx", label v2-8-6dev_3Thomas E. Dickey2004-05-071-32/+30
* snapshot of project "lynx", label v2-8-6dev_2Thomas E. Dickey2004-04-271-7/+7
* snapshot of project "lynx", label v2-8-3dev_10Thomas E. Dickey1999-09-291-1/+1
* snapshot of project "lynx", label v2-8-2dev_22Thomas E. Dickey1999-04-131-2/+0
* snapshot of project "lynx", label v2-8-2dev_2Thomas E. Dickey1998-11-101-5/+2
* snapshot of project "lynx", label v2-8-1dev_4Thomas E. Dickey1998-11-061-2/+5
* snapshot of project "lynx", label v2-8-1dev_20Thomas E. Dickey1998-08-061-3/+0
* snapshot of project "lynx", label v2-8-1dev_7Thomas E. Dickey1998-04-231-2/+2
* snapshot of project "lynx", label v2-8-1dev_5Thomas E. Dickey1998-03-291-5/+5
* snapshot of project "lynx", label v2_6Thomas E. Dickey1996-09-021-0/+87
ckground-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 * $LynxId: HTCJK.h,v 1.19 2012/08/15 23:11:03 tom Exp $
 *
 *			CJK character converter		HTCJK.h
 *			=======================
 *
 *	Added 11-Jun-96 by FM, based on jiscode.h for
 *	  Yutaka Sato's (ysato@etl.go.jp) SJIS.c, and
 *	  Takuya ASADA's (asada@three-a.co.jp) CJK patches.
 *	  (see SGML.c).
 *
 */

#ifndef HTCJK_H
#define HTCJK_H

#ifndef HTUTILS_H
#include <HTUtils.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif
/*
 *	STATUS CHANGE CODES
 */
#define TO_2BCODE	'$'
#define TO_1BCODE	'('
#define TO_KANA		'\016'
#define TO_KANAOUT	'\017'
#define TO_KANJI	"\033$B"
#define TO_HANJI	"\033$A"
#define TO_HANGUL	"\033$(C"
#define TO_ASCII	"\033(B"
#define IS_SJIS_LO(lo)	((0x40<=lo)&&(lo!=0x7F)&&(lo<=0xFC))
#define IS_SJIS_HI1(hi) ((0x81 <= (hi)) && ((hi) <= 0x9F))	/* 1st lev. */
#define IS_SJIS_HI2(hi) ((0xE0 <= (hi)) && ((hi) <= 0xEF))	/* 2nd lev. */
#define IS_SJIS(hi,lo,in_sjis) (!IS_SJIS_LO(lo)?0:IS_SJIS_HI1(hi)?(in_sjis=1):in_sjis&&IS_SJIS_HI2(hi))
#define IS_SJIS_2BYTE(hi,lo) (IS_SJIS_LO(lo)&&(IS_SJIS_HI1(hi)||IS_SJIS_HI2(hi)))
#define IS_SJIS_X0201KANA(lo) ((0xA1<=lo)&&(lo<=0xDF))
#define IS_EUC_LOX(lo)	((0xA1<=lo)&&(lo<=0xFE))	/* extended */
#define IS_EUC_HI(hi)	((0xA1<=hi)&&(hi<=0xFE))
#define IS_EUC_X0201KANA(hi,lo) ((hi==0x8E)&&(0xA1<=lo)&&(lo<=0xDF))
#define IS_EUC(hi,lo) ((IS_EUC_HI(hi) && IS_EUC_LOX(lo))||IS_EUC_X0201KANA(hi,lo))
#define IS_JAPANESE_2BYTE(hi,lo) (IS_SJIS_2BYTE(hi,lo) || IS_EUC(hi,lo))
#define IS_BIG5_LOS(lo)	((0x40<=lo)&&(lo<=0x7E))	/* standard */
#define IS_BIG5_LOX(lo)	((0xA1<=lo)&&(lo<=0xFE))	/* extended */
#define IS_BIG5_HI(hi)	((0xA1<=hi)&&(hi<=0xFE))
#define IS_BIG5(hi,lo) (IS_BIG5_HI(hi) && (IS_BIG5_LOS(lo) || IS_BIG5_LOX(lo)))
    typedef enum {
	NOKANJI = 0, EUC, SJIS, JIS
    } HTkcode;
    typedef enum {
	NOCJK = 0, JAPANESE, CHINESE, KOREAN, TAIPEI
    } HTCJKlang;

    extern HTCJKlang HTCJK;

/*
 *  Function prototypes.
 */
    extern void JISx0201TO0208_EUC(unsigned IHI,
				   unsigned ILO,
				   unsigned char *OHI,
				   unsigned char *OLO);

    extern unsigned char *SJIS_TO_JIS1(unsigned HI,
				       unsigned LO,
				       unsigned char *JCODE);

    extern unsigned char *JIS_TO_SJIS1(unsigned HI,
				       unsigned LO,
				       unsigned char *SJCODE);

    extern unsigned char *EUC_TO_SJIS1(unsigned HI,
				       unsigned LO,
				       register unsigned char *SJCODE);

    extern void JISx0201TO0208_SJIS(unsigned I,
				    unsigned char *OHI,
				    unsigned char *OLO);

    extern unsigned char *SJIS_TO_EUC1(unsigned HI,
				       unsigned LO,
				       unsigned char *EUCp);

    extern unsigned char *SJIS_TO_EUC(unsigned char *src,
				      unsigned char *dst);

    extern unsigned char *EUC_TO_SJIS(unsigned char *src,
				      unsigned char *dst);

    extern unsigned char *EUC_TO_JIS(unsigned char *src,
				     unsigned char *dst,
				     const char *toK,
				     const char *toA);

    extern unsigned char *TO_EUC(const unsigned char *jis,
				 unsigned char *euc);

    extern void TO_SJIS(const unsigned char *any,
			unsigned char *sjis);

    extern void TO_JIS(const unsigned char *any,
		       unsigned char *jis);

    extern char *str_kcode(HTkcode code);

#ifdef __cplusplus
}
#endif
#endif				/* HTCJK_H */