mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 19:33:18 +00:00
790694c449
--HG-- rename : intl/lwbrk/src/Makefile.in => intl/lwbrk/Makefile.in rename : intl/lwbrk/src/crashtests/416721.html => intl/lwbrk/crashtests/416721.html rename : intl/lwbrk/src/crashtests/crashtests.list => intl/lwbrk/crashtests/crashtests.list rename : intl/lwbrk/src/jisx4051class.h => intl/lwbrk/jisx4051class.h rename : intl/lwbrk/src/jisx4051pairtable.txt => intl/lwbrk/jisx4051pairtable.txt rename : intl/lwbrk/src/nsCarbonBreaker.cpp => intl/lwbrk/nsCarbonBreaker.cpp rename : intl/lwbrk/src/nsComplexBreaker.h => intl/lwbrk/nsComplexBreaker.h rename : intl/lwbrk/public/nsILineBreaker.h => intl/lwbrk/nsILineBreaker.h rename : intl/lwbrk/idl/nsISemanticUnitScanner.idl => intl/lwbrk/nsISemanticUnitScanner.idl rename : intl/lwbrk/public/nsIWordBreaker.h => intl/lwbrk/nsIWordBreaker.h rename : intl/lwbrk/src/nsJISx4051LineBreaker.cpp => intl/lwbrk/nsJISx4051LineBreaker.cpp rename : intl/lwbrk/src/nsJISx4051LineBreaker.h => intl/lwbrk/nsJISx4051LineBreaker.h rename : intl/lwbrk/public/nsLWBrkCIID.h => intl/lwbrk/nsLWBrkCIID.h rename : intl/lwbrk/src/nsPangoBreaker.cpp => intl/lwbrk/nsPangoBreaker.cpp rename : intl/lwbrk/src/nsRuleBreaker.cpp => intl/lwbrk/nsRuleBreaker.cpp rename : intl/lwbrk/src/nsSampleWordBreaker.cpp => intl/lwbrk/nsSampleWordBreaker.cpp rename : intl/lwbrk/src/nsSampleWordBreaker.h => intl/lwbrk/nsSampleWordBreaker.h rename : intl/lwbrk/src/nsSemanticUnitScanner.cpp => intl/lwbrk/nsSemanticUnitScanner.cpp rename : intl/lwbrk/src/nsSemanticUnitScanner.h => intl/lwbrk/nsSemanticUnitScanner.h rename : intl/lwbrk/src/nsUniscribeBreaker.cpp => intl/lwbrk/nsUniscribeBreaker.cpp rename : intl/lwbrk/src/rulebrk.c => intl/lwbrk/rulebrk.c rename : intl/lwbrk/src/rulebrk.h => intl/lwbrk/rulebrk.h rename : intl/lwbrk/src/th_char.h => intl/lwbrk/th_char.h
56 lines
2.2 KiB
C
56 lines
2.2 KiB
C
/*
|
|
Copyright (c) 1999 Samphan Raruenrom <samphan@thai.com>
|
|
Permission to use, copy, modify, distribute and sell this software
|
|
and its documentation for any purpose is hereby granted without fee,
|
|
provided that the above copyright notice appear in all copies and
|
|
that both that copyright notice and this permission notice appear
|
|
in supporting documentation. Samphan Raruenrom makes no
|
|
representations about the suitability of this software for any
|
|
purpose. It is provided "as is" without express or implied warranty.
|
|
*/
|
|
#ifndef __TH_CHAR_H__
|
|
#define __TH_CHAR_H__
|
|
#include "nscore.h"
|
|
|
|
|
|
typedef unsigned char tis_char;
|
|
|
|
#ifdef TH_UNICODE
|
|
/*
|
|
* The char16_t type is only usable in C++ code, so we need this ugly hack to
|
|
* select a binary compatible C type for the expat C code to use.
|
|
*/
|
|
#ifdef __cplusplus
|
|
typedef char16_t th_char;
|
|
#else
|
|
typedef uint16_t th_char;
|
|
#endif
|
|
#define TH_THAIBEGIN_ 0x0e00
|
|
#define th_isthai(c) (0x0e00 <= (c) && (c) <= 0x0e5f)
|
|
#else
|
|
typedef tis_char th_char;
|
|
#define TH_THAIBEGIN_ 0xa0
|
|
#define th_isthai(c) ((c) >= 0xa0)
|
|
#endif
|
|
#define th_zcode(c) ((c) - TH_THAIBEGIN_)
|
|
|
|
enum TH_CHARNAME {
|
|
TH_THAIBEGIN = TH_THAIBEGIN_,
|
|
TH_KOKAI,TH_KHOKHAI,TH_KHOKHUAT,TH_KHOKHWAI,TH_KHOKHON,TH_KHORAKHANG,
|
|
TH_NGONGU,TH_CHOCHAN,TH_CHOCHING,TH_CHOCHANG,TH_SOSO,TH_CHOCHOE,TH_YOYING,
|
|
TH_DOCHADA,TH_TOPATAK,TH_THOTHAN,TH_THONANGMONTHO,TH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