intl/uconv/ucvcn/nsHZToUnicode.h

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

     1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef nsHZToUnicode_h___
     7 #define nsHZToUnicode_h___
     9 #include "nsUCSupport.h"
    10 #include "nsGBKConvUtil.h"
    12 //----------------------------------------------------------------------
    13 // Class nsHZToUnicode [declaration]
    15 /**
    16  * A character set converter from GBK to Unicode.
    17  * 
    18  *
    19  * @created         08/Sept/1999
    20  * @author  Yueheng Xu, Yueheng.Xu@intel.com
    21  */
    22 class nsHZToUnicode : public nsBufferDecoderSupport
    23 {
    24 public:
    26   /**
    27    * Class constructor.
    28    */
    29   nsHZToUnicode();
    31 protected:
    33   //--------------------------------------------------------------------
    34   // Subclassing of nsDecoderSupport class [declaration]
    35   NS_IMETHOD ConvertNoBuff(const char* aSrc, int32_t * aSrcLength, 
    36                            char16_t *aDest, int32_t * aDestLength); 
    37   nsGBKConvUtil mUtil;
    39 private:
    40   int16_t mHZState;
    41   uint32_t mRunLength; // length of a run of 8-bit GB-encoded characters
    42   char mOddByte; // first byte of a multi-byte sequence from a previous buffer
    44 };
    46 #endif /* nsHZToUnicode_h___ */

mercurial