Back to index

lightning-sunbird  0.9+nobinonly
nsGB18030Verifier.h
Go to the documentation of this file.
00001 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either of the GNU General Public License Version 2 or later (the "GPL"),
00026  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 /* 
00038  * DO NOT EDIT THIS DOCUMENT MANUALLY !!!
00039  * THIS FILE IS AUTOMATICALLY GENERATED BY THE TOOLS UNDER
00040  *    mozilla/intl/chardet/tools/
00041  * Please contact ftang@netscape.com or mozilla-i18n@mozilla.org
00042  * if you have any question. Thanks
00043  */
00044 #include "nsVerifier.h"
00045 static const PRUint32 gb18030_cls [ 256 / 8 ] = {
00046 PCK4BITS(1,1,1,1,1,1,1,1),  // 00 - 07 
00047 PCK4BITS(1,1,1,1,1,1,0,0),  // 08 - 0f 
00048 PCK4BITS(1,1,1,1,1,1,1,1),  // 10 - 17 
00049 PCK4BITS(1,1,1,0,1,1,1,1),  // 18 - 1f 
00050 PCK4BITS(1,1,1,1,1,1,1,1),  // 20 - 27 
00051 PCK4BITS(1,1,1,1,1,1,1,1),  // 28 - 2f 
00052 PCK4BITS(3,3,3,3,3,3,3,3),  // 30 - 37 
00053 PCK4BITS(3,3,1,1,1,1,1,1),  // 38 - 3f 
00054 PCK4BITS(2,2,2,2,2,2,2,2),  // 40 - 47 
00055 PCK4BITS(2,2,2,2,2,2,2,2),  // 48 - 4f 
00056 PCK4BITS(2,2,2,2,2,2,2,2),  // 50 - 57 
00057 PCK4BITS(2,2,2,2,2,2,2,2),  // 58 - 5f 
00058 PCK4BITS(2,2,2,2,2,2,2,2),  // 60 - 67 
00059 PCK4BITS(2,2,2,2,2,2,2,2),  // 68 - 6f 
00060 PCK4BITS(2,2,2,2,2,2,2,2),  // 70 - 77 
00061 PCK4BITS(2,2,2,2,2,2,2,4),  // 78 - 7f 
00062 PCK4BITS(5,6,6,6,6,6,6,6),  // 80 - 87 
00063 PCK4BITS(6,6,6,6,6,6,6,6),  // 88 - 8f 
00064 PCK4BITS(6,6,6,6,6,6,6,6),  // 90 - 97 
00065 PCK4BITS(6,6,6,6,6,6,6,6),  // 98 - 9f 
00066 PCK4BITS(6,6,6,6,6,6,6,6),  // a0 - a7 
00067 PCK4BITS(6,6,6,6,6,6,6,6),  // a8 - af 
00068 PCK4BITS(6,6,6,6,6,6,6,6),  // b0 - b7 
00069 PCK4BITS(6,6,6,6,6,6,6,6),  // b8 - bf 
00070 PCK4BITS(6,6,6,6,6,6,6,6),  // c0 - c7 
00071 PCK4BITS(6,6,6,6,6,6,6,6),  // c8 - cf 
00072 PCK4BITS(6,6,6,6,6,6,6,6),  // d0 - d7 
00073 PCK4BITS(6,6,6,6,6,6,6,6),  // d8 - df 
00074 PCK4BITS(6,6,6,6,6,6,6,6),  // e0 - e7 
00075 PCK4BITS(6,6,6,6,6,6,6,6),  // e8 - ef 
00076 PCK4BITS(6,6,6,6,6,6,6,6),  // f0 - f7 
00077 PCK4BITS(6,6,6,6,6,6,6,0)   // f8 - ff 
00078 };
00079 
00080 
00081 static const PRUint32 gb18030_st [ 6] = {
00082 PCK4BITS(eError,eStart,eStart,eStart,eStart,eStart,     3,eError),//00-07 
00083 PCK4BITS(eError,eError,eError,eError,eError,eError,eItsMe,eItsMe),//08-0f 
00084 PCK4BITS(eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eError,eError,eStart),//10-17 
00085 PCK4BITS(     4,eError,eStart,eStart,eError,eError,eError,eError),//18-1f 
00086 PCK4BITS(eError,eError,     5,eError,eError,eError,eItsMe,eError),//20-27 
00087 PCK4BITS(eError,eError,eStart,eStart,eStart,eStart,eStart,eStart) //28-2f 
00088 };
00089 
00090 
00091 static nsVerifier nsGB18030Verifier = {
00092      "gb18030",
00093     {
00094        eIdxSft4bits, 
00095        eSftMsk4bits, 
00096        eBitSft4bits, 
00097        eUnitMsk4bits, 
00098        gb18030_cls 
00099     },
00100     7,
00101     {
00102        eIdxSft4bits, 
00103        eSftMsk4bits, 
00104        eBitSft4bits, 
00105        eUnitMsk4bits, 
00106        gb18030_st 
00107     }
00108 };