intl/uconv/ucvtw/nsBIG5ToUnicode.cpp

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/intl/uconv/ucvtw/nsBIG5ToUnicode.cpp	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,39 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsBIG5ToUnicode.h"
    1.10 +#include "nsUCvTWDll.h"
    1.11 +#include "nsUCConstructors.h"
    1.12 +
    1.13 +//----------------------------------------------------------------------
    1.14 +// Global functions and data [declaration]
    1.15 +
    1.16 +static const uScanClassID g_BIG5ScanClassIDs[] = {
    1.17 +  u1ByteCharset,
    1.18 +  u2BytesCharset
    1.19 +};
    1.20 +
    1.21 +static const uint16_t *g_BIG5MappingTableSet [] ={
    1.22 +  g_ASCIIMappingTable,
    1.23 +  g_utBIG5Mapping
    1.24 +};
    1.25 +
    1.26 +static const uRange g_BIG5Ranges[] = {
    1.27 +  { 0x00, 0x7F },
    1.28 +  { 0x81, 0xFE }
    1.29 +};
    1.30 +
    1.31 +nsresult
    1.32 +nsBIG5ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID,
    1.33 +                           void **aResult)
    1.34 +{
    1.35 +  return CreateMultiTableDecoder(2, 
    1.36 +                                 (const uRange* ) &g_BIG5Ranges,
    1.37 +                                 (uScanClassID*) &g_BIG5ScanClassIDs,
    1.38 +                                 (uMappingTable**) &g_BIG5MappingTableSet, 1,
    1.39 +                                 aOuter, aIID, aResult);
    1.40 +}
    1.41 +
    1.42 +

mercurial