Attachment #93181: consolidate everything v1.2 for bug #157993

View | Details | Raw Unified | Return to bug 157993
Collapse All | Expand All

(-)intl/uconv/Makefile.in (-1 / +1 lines)
Line     Link Here 
 Lines 38-44    Link Here 
38
38
39
include $(DEPTH)/config/autoconf.mk
39
include $(DEPTH)/config/autoconf.mk
40
40
41
DIRS		= idl public src ucvja ucvcn ucvlatin ucvtw ucvtw2 ucvko ucvibm
41
DIRS		= idl public src util ucvja ucvcn ucvlatin ucvtw ucvtw2 ucvko ucvibm ucvasia ucvwestern
42
42
43
ifdef MOZ_MATHML
43
ifdef MOZ_MATHML
44
DIRS           += ucvmath
44
DIRS           += ucvmath
(-)intl/uconv/src/Makefile.in (-1 / +6 lines)
Line     Link Here 
 Lines 67-73    Link Here 
67
		nsUnicodeToCP1252.cpp \
67
		nsUnicodeToCP1252.cpp \
68
		nsUnicodeToMacRoman.cpp \
68
		nsUnicodeToMacRoman.cpp \
69
		nsUnicodeToUTF8.cpp \
69
		nsUnicodeToUTF8.cpp \
70
		nsUCvMinSupport.cpp \
71
		nsScriptableUConv.cpp \
70
		nsScriptableUConv.cpp \
72
		nsConverterInputStream.cpp \
71
		nsConverterInputStream.cpp \
73
		$(NULL)
72
		$(NULL)
 Lines 115-120    Link Here 
115
ifneq (,$(filter cocoa mac, $(MOZ_WIDGET_TOOLKIT)))
114
ifneq (,$(filter cocoa mac, $(MOZ_WIDGET_TOOLKIT)))
116
EXTRA_DSO_LDOPTS += $(TK_LIBS)
115
EXTRA_DSO_LDOPTS += $(TK_LIBS)
117
endif
116
endif
117
118
LOCAL_INCLUDES	= -I$(srcdir)/../util
119
120
SHARED_LIBRARY_LIBS = \
121
	$(DIST)/lib/$(LIB_PREFIX)ucvutil_s.$(LIB_SUFFIX) \
122
	$(NULL)
118
123
119
include $(topsrcdir)/config/rules.mk
124
include $(topsrcdir)/config/rules.mk
120
125
(-)intl/uconv/src/nsCP1252ToUnicode.cpp (-1 / +1 lines)
Line     Link Here 
 Lines 36-42    Link Here 
36
 *
36
 *
37
 * ***** END LICENSE BLOCK ***** */
37
 * ***** END LICENSE BLOCK ***** */
38
38
39
#include "nsUCvMinSupport.h"
39
#include "nsUCSupport.h"
40
#include "nsCP1252ToUnicode.h"
40
#include "nsCP1252ToUnicode.h"
41
41
42
//----------------------------------------------------------------------
42
//----------------------------------------------------------------------
(-)intl/uconv/src/nsISO88591ToUnicode.cpp (-1 / +1 lines)
Line     Link Here 
 Lines 36-42    Link Here 
36
 *
36
 *
37
 * ***** END LICENSE BLOCK ***** */
37
 * ***** END LICENSE BLOCK ***** */
38
38
39
#include "nsUCvMinSupport.h"
39
#include "nsUCSupport.h"
40
#include "nsISO88591ToUnicode.h"
40
#include "nsISO88591ToUnicode.h"
41
41
42
//----------------------------------------------------------------------
42
//----------------------------------------------------------------------
(-)intl/uconv/src/nsMacRomanToUnicode.cpp (-13 / +2 lines)
Line     Link Here 
 Lines 36-42    Link Here 
36
 *
36
 *
37
 * ***** END LICENSE BLOCK ***** */
37
 * ***** END LICENSE BLOCK ***** */
38
38
39
#include "nsUCvMinSupport.h"
39
#include "nsUCSupport.h"
40
#include "nsMacRomanToUnicode.h"
40
#include "nsMacRomanToUnicode.h"
41
41
42
//----------------------------------------------------------------------
42
//----------------------------------------------------------------------
 Lines 56-73    Link Here 
56
56
57
nsMacRomanToUnicode::nsMacRomanToUnicode() 
57
nsMacRomanToUnicode::nsMacRomanToUnicode() 
58
: nsTableDecoderSupport((uShiftTable*) &g_MacRomanShiftTable, 
58
: nsTableDecoderSupport((uShiftTable*) &g_MacRomanShiftTable, 
59
                        (uMappingTable*) &g_MacRomanMappingTable)
59
                        (uMappingTable*) &g_MacRomanMappingTable, 1)
60
{
60
{
61
}
61
}
62
62
63
//----------------------------------------------------------------------
64
// Subclassing of nsTableDecoderSupport class [implementation]
65
66
NS_IMETHODIMP nsMacRomanToUnicode::GetMaxLength(const char * aSrc, 
67
                                              PRInt32 aSrcLength, 
68
                                              PRInt32 * aDestLength)
69
{
70
  // we are a single byte to Unicode converter, so...
71
  *aDestLength = aSrcLength;
72
  return NS_OK_UDEC_EXACTLENGTH;
73
}
(-)intl/uconv/src/nsMacRomanToUnicode.h (-5 lines)
Line     Link Here 
 Lines 69-79    Link Here 
69
69
70
protected:
70
protected:
71
71
72
  //--------------------------------------------------------------------
73
  // Subclassing of nsDecoderSupport class [declaration]
74
75
  NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength, 
76
      PRInt32 * aDestLength);
77
};
72
};
78
73
79
#endif /* nsMacRomanToUnicode_h___ */
74
#endif /* nsMacRomanToUnicode_h___ */
(-)intl/uconv/src/nsUConvModule.cpp (-1 / +1 lines)
Line     Link Here 
 Lines 58-64    Link Here 
58
#include "nsIScriptableUConv.h"
58
#include "nsIScriptableUConv.h"
59
#include "nsConverterInputStream.h"
59
#include "nsConverterInputStream.h"
60
60
61
#include "nsUCvMinSupport.h"
61
#include "nsUCSupport.h"
62
#include "nsCharsetConverterManager.h"
62
#include "nsCharsetConverterManager.h"
63
#include "nsUnicodeDecodeHelper.h"
63
#include "nsUnicodeDecodeHelper.h"
64
#include "nsUnicodeEncodeHelper.h"
64
#include "nsUnicodeEncodeHelper.h"
(-)intl/uconv/src/nsUTF8ToUnicode.cpp (-1 / +1 lines)
Line     Link Here 
 Lines 36-42    Link Here 
36
 *
36
 *
37
 * ***** END LICENSE BLOCK ***** */
37
 * ***** END LICENSE BLOCK ***** */
38
38
39
#include "nsUCvMinSupport.h"
39
#include "nsUCSupport.h"
40
#include "nsUTF8ToUnicode.h"
40
#include "nsUTF8ToUnicode.h"
41
41
42
NS_IMETHODIMP NS_NewUTF8ToUnicode(nsISupports* aOuter, 
42
NS_IMETHODIMP NS_NewUTF8ToUnicode(nsISupports* aOuter, 
(-)intl/uconv/src/nsUnicodeToCP1252.cpp (-12 / +2 lines)
Line     Link Here 
 Lines 36-42    Link Here 
36
 *
36
 *
37
 * ***** END LICENSE BLOCK ***** */
37
 * ***** END LICENSE BLOCK ***** */
38
38
39
#include "nsUCvMinSupport.h"
39
#include "nsUCSupport.h"
40
#include "nsUnicodeToCP1252.h"
40
#include "nsUnicodeToCP1252.h"
41
41
42
//----------------------------------------------------------------------
42
//----------------------------------------------------------------------
 Lines 56-72    Link Here 
56
56
57
nsUnicodeToCP1252::nsUnicodeToCP1252() 
57
nsUnicodeToCP1252::nsUnicodeToCP1252() 
58
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
59
                        (uMappingTable*) &g_ufMappingTable)
59
                        (uMappingTable*) &g_ufMappingTable, 1)
60
{
60
{
61
}
61
}
62
62
63
//----------------------------------------------------------------------
64
// Subclassing of nsTableEncoderSupport class [implementation]
65
66
NS_IMETHODIMP nsUnicodeToCP1252::GetMaxLength(const PRUnichar * aSrc, 
67
                                              PRInt32 aSrcLength,
68
                                              PRInt32 * aDestLength)
69
{
70
  *aDestLength = aSrcLength;
71
  return NS_OK_UENC_EXACTLENGTH;
72
}
(-)intl/uconv/src/nsUnicodeToCP1252.h (-7 lines)
Line     Link Here 
 Lines 67-79    Link Here 
67
   */
67
   */
68
  nsUnicodeToCP1252();
68
  nsUnicodeToCP1252();
69
69
70
protected:
71
72
  //--------------------------------------------------------------------
73
  // Subclassing of nsEncoderSupport class [declaration]
74
75
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
76
      PRInt32 * aDestLength);
77
};
70
};
78
71
79
#endif /* nsUnicodeToCP1252_h___ */
72
#endif /* nsUnicodeToCP1252_h___ */
(-)intl/uconv/src/nsUnicodeToISO88591.cpp (-13 / +2 lines)
Line     Link Here 
 Lines 36-42    Link Here 
36
 *
36
 *
37
 * ***** END LICENSE BLOCK ***** */
37
 * ***** END LICENSE BLOCK ***** */
38
38
39
#include "nsUCvMinSupport.h"
39
#include "nsUCSupport.h"
40
#include "nsUnicodeToISO88591.h"
40
#include "nsUnicodeToISO88591.h"
41
41
42
//----------------------------------------------------------------------
42
//----------------------------------------------------------------------
 Lines 56-73    Link Here 
56
56
57
nsUnicodeToISO88591::nsUnicodeToISO88591() 
57
nsUnicodeToISO88591::nsUnicodeToISO88591() 
58
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
59
                        (uMappingTable*) &g_ufMappingTable)
59
                        (uMappingTable*) &g_ufMappingTable, 1)
60
{
60
{
61
}
62
63
//----------------------------------------------------------------------
64
// Subclassing of nsTableEncoderSupport class [implementation]
65
66
NS_IMETHODIMP nsUnicodeToISO88591::GetMaxLength(const PRUnichar * aSrc, 
67
                                              PRInt32 aSrcLength,
68
                                              PRInt32 * aDestLength)
69
{
70
  *aDestLength = aSrcLength;
71
  return NS_OK_UENC_EXACTLENGTH;
72
}
61
}
73
62
(-)intl/uconv/src/nsUnicodeToISO88591.h (-8 lines)
Line     Link Here 
 Lines 67-79    Link Here 
67
   */
67
   */
68
  nsUnicodeToISO88591();
68
  nsUnicodeToISO88591();
69
69
70
protected:
71
72
  //--------------------------------------------------------------------
73
  // Subclassing of nsEncoderSupport class [declaration]
74
75
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
76
      PRInt32 * aDestLength);
77
};
70
};
78
79
#endif /* nsUnicodeToISO88591_h___ */
71
#endif /* nsUnicodeToISO88591_h___ */
(-)intl/uconv/src/nsUnicodeToMacRoman.cpp (-12 / +2 lines)
Line     Link Here 
 Lines 36-42    Link Here 
36
 *
36
 *
37
 * ***** END LICENSE BLOCK ***** */
37
 * ***** END LICENSE BLOCK ***** */
38
38
39
#include "nsUCvMinSupport.h"
39
#include "nsUCSupport.h"
40
#include "nsUnicodeToMacRoman.h"
40
#include "nsUnicodeToMacRoman.h"
41
41
42
//----------------------------------------------------------------------
42
//----------------------------------------------------------------------
 Lines 56-72    Link Here 
56
56
57
nsUnicodeToMacRoman::nsUnicodeToMacRoman() 
57
nsUnicodeToMacRoman::nsUnicodeToMacRoman() 
58
: nsTableEncoderSupport((uShiftTable*) &g_MacRomanShiftTable, 
58
: nsTableEncoderSupport((uShiftTable*) &g_MacRomanShiftTable, 
59
                        (uMappingTable*) &g_MacRomanMappingTable)
59
                        (uMappingTable*) &g_MacRomanMappingTable, 1)
60
{
60
{
61
}
61
}
62
62
63
//----------------------------------------------------------------------
64
// Subclassing of nsTableEncoderSupport class [implementation]
65
66
NS_IMETHODIMP nsUnicodeToMacRoman::GetMaxLength(const PRUnichar * aSrc, 
67
                                              PRInt32 aSrcLength,
68
                                              PRInt32 * aDestLength)
69
{
70
  *aDestLength = aSrcLength;
71
  return NS_OK_UENC_EXACTLENGTH;
72
}
(-)intl/uconv/src/nsUnicodeToMacRoman.h (-7 lines)
Line     Link Here 
 Lines 64-76    Link Here 
64
   */
64
   */
65
  nsUnicodeToMacRoman();
65
  nsUnicodeToMacRoman();
66
66
67
protected:
68
69
  //--------------------------------------------------------------------
70
  // Subclassing of nsEncoderSupport class [declaration]
71
72
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
73
      PRInt32 * aDestLength);
74
};
67
};
75
68
76
#endif /* nsUnicodeToMacRoman_h___ */
69
#endif /* nsUnicodeToMacRoman_h___ */
(-)intl/uconv/src/nsUnicodeToUTF8.cpp (-1 / +1 lines)
Line     Link Here 
 Lines 38-44    Link Here 
38
38
39
//----------------------------------------------------------------------
39
//----------------------------------------------------------------------
40
// Global functions and data [declaration]
40
// Global functions and data [declaration]
41
#include "nsUCvMinSupport.h"
41
#include "nsUCSupport.h"
42
#include "nsUnicodeToUTF8.h"
42
#include "nsUnicodeToUTF8.h"
43
#include <string.h>
43
#include <string.h>
44
44
(-)intl/uconv/tests/Makefile.in (+1 lines)
Line     Link Here 
 Lines 52-57    Link Here 
52
INCLUDES	+= \
52
INCLUDES	+= \
53
		-I$(srcdir)/../ucvlatin \
53
		-I$(srcdir)/../ucvlatin \
54
		-I$(srcdir)/../ucvja \
54
		-I$(srcdir)/../ucvja \
55
		-I$(srcdir)/../util \
55
		$(NULL)
56
		$(NULL)
56
57
57
LIBS		+= \
58
LIBS		+= \
(-)intl/uconv/tests/TestUConv.cpp (-7 / +54 lines)
Line     Link Here 
 Lines 39-44    Link Here 
39
#include "nsIServiceManager.h"
39
#include "nsIServiceManager.h"
40
#include "nsICharsetConverterManager.h"
40
#include "nsICharsetConverterManager.h"
41
#include "nsICharsetConverterManager2.h"
41
#include "nsICharsetConverterManager2.h"
42
#include "nsUCSupport.h"
42
#include "nsString.h"
43
#include "nsString.h"
43
44
44
//----------------------------------------------------------------------------
45
//----------------------------------------------------------------------------
 Lines 211-218    Link Here 
211
  mLog.AddTrace(trace);
212
  mLog.AddTrace(trace);
212
  nsresult res = NS_OK;
213
  nsresult res = NS_OK;
213
214
214
  // XXX write me
215
  nsCOMPtr<nsICharsetConverterManager2> ccMan = 
216
           do_GetService(kCharsetConverterManagerCID, &res);
217
  if (NS_FAILED(res)) return res;
218
  
219
  nsCOMPtr<nsISupportsArray> encoders;
220
  res = ccMan->GetEncoderList(getter_AddRefs(encoders));
221
  if (NS_FAILED(res)) return res;
215
222
223
  PRUint32 encoderCount;
224
  encoders->Count(&encoderCount);
225
  printf("There are %d encoders\n", encoderCount);
226
  
216
  mLog.DelTrace(trace);
227
  mLog.DelTrace(trace);
217
  return res;
228
  return res;
218
}
229
}
 Lines 385-390    Link Here 
385
396
386
  printf("***** Character Sets [%d] *****\n", count);
397
  printf("***** Character Sets [%d] *****\n", count);
387
398
399
  PRUint32 encCount = 0, decCount = 0;
400
  PRUint32 basicEncCount = 0, basicDecCount = 0;
401
  
388
  for (PRUint32 i = 0; i < count; i++) {
402
  for (PRUint32 i = 0; i < count; i++) {
389
    nsCOMPtr<nsIAtom> cs;
403
    nsCOMPtr<nsIAtom> cs;
390
    nsAutoString str;
404
    nsAutoString str;
 Lines 408-426    Link Here 
408
    printf("%s", buff.get());
422
    printf("%s", buff.get());
409
    PrintSpaces(24 - buff.Length());  // align to hard coded column number
423
    PrintSpaces(24 - buff.Length());  // align to hard coded column number
410
424
411
    res = ccMan->GetCharsetTitle2(cs, &str);
412
    if (NS_FAILED(res)) str.SetLength(0);
413
    NS_LossyConvertUCS2toASCII buff2(str);
414
425
415
    nsCOMPtr<nsIUnicodeDecoder> dec = NULL;
426
    nsCOMPtr<nsIUnicodeDecoder> dec = NULL;
416
    res = ccMan->GetUnicodeDecoder(cs, getter_AddRefs(dec));
427
    res = ccMan->GetUnicodeDecoder(cs, getter_AddRefs(dec));
417
    if (NS_FAILED(res)) printf (" "); 
428
    if (NS_FAILED(res)) printf (" "); 
418
    else printf("D");
429
    else {
430
      printf("D");
431
      decCount++;
432
    }
433
434
    // show the "basic" decoder classes
435
    if (dec) {
436
      nsCOMPtr<nsIBasicDecoder> isBasic = do_QueryInterface(dec);
437
      if (isBasic) {
438
        basicDecCount++;
439
        printf("b");
440
      }
441
      else printf(" ");
442
    }
443
    else printf(" ");
444
    
419
445
420
    nsCOMPtr<nsIUnicodeEncoder> enc = NULL;
446
    nsCOMPtr<nsIUnicodeEncoder> enc = NULL;
421
    res = ccMan->GetUnicodeEncoder(cs, getter_AddRefs(enc));
447
    res = ccMan->GetUnicodeEncoder(cs, getter_AddRefs(enc));
422
    if (NS_FAILED(res)) printf (" "); 
448
    if (NS_FAILED(res)) printf (" "); 
423
    else printf("E");
449
    else {
450
      printf("E");
451
      encCount++;
452
    }
453
    
454
    if (enc) {
455
      nsCOMPtr<nsIBasicEncoder> isBasic = do_QueryInterface(enc);
456
      if (isBasic) {
457
        basicEncCount++;
458
        printf("b");
459
      }
460
      else printf(" ");
461
    } else printf(" ");
424
462
425
    printf(" ");
463
    printf(" ");
426
464
 Lines 444-452    Link Here 
444
    if ((enc != NULL) && (NS_FAILED(res))) printf ("E"); 
482
    if ((enc != NULL) && (NS_FAILED(res))) printf ("E"); 
445
    else printf("X");
483
    else printf("X");
446
484
447
    printf(" \"%s\"\n", buff2);
485
    printf("(%3d, %3d) ", encCount, decCount);
486
    res = ccMan->GetCharsetTitle2(cs, &str);
487
    if (NS_FAILED(res)) str.SetLength(0);
488
    NS_LossyConvertUCS2toASCII buff2(str);
489
    printf(" \"%s\"\n", buff2.get());
448
  }
490
  }
449
491
492
  printf("%u of %u decoders are basic (%d%%)\n",
493
         basicDecCount, decCount, (basicDecCount * 100) / decCount);
494
495
  printf("%u of %u encoders are basic (%d%%)\n",
496
         basicEncCount, encCount, (basicEncCount * 100) / encCount);
450
  mLog.DelTrace(trace);
497
  mLog.DelTrace(trace);
451
  return NS_OK;
498
  return NS_OK;
452
}
499
}
(-)intl/uconv/ucvasia/Makefile.in (+2 lines)
Line     Link Here 
 Lines 46-51    Link Here 
46
	$(DIST)/lib/$(LIB_PREFIX)ucvtw2_s.$(LIB_SUFFIX) \
46
	$(DIST)/lib/$(LIB_PREFIX)ucvtw2_s.$(LIB_SUFFIX) \
47
	$(DIST)/lib/$(LIB_PREFIX)ucvtw_s.$(LIB_SUFFIX) \
47
	$(DIST)/lib/$(LIB_PREFIX)ucvtw_s.$(LIB_SUFFIX) \
48
	$(DIST)/lib/$(LIB_PREFIX)ucvko_s.$(LIB_SUFFIX) \
48
	$(DIST)/lib/$(LIB_PREFIX)ucvko_s.$(LIB_SUFFIX) \
49
	$(DIST)/lib/$(LIB_PREFIX)ucvcn_s.$(LIB_SUFFIX) \
49
	$(NULL)
50
	$(NULL)
50
51
51
LOCAL_INCLUDES	= -I$(srcdir)/../util \
52
LOCAL_INCLUDES	= -I$(srcdir)/../util \
 Lines 53-58    Link Here 
53
				-I$(srcdir)/../ucvtw2 \
54
				-I$(srcdir)/../ucvtw2 \
54
				-I$(srcdir)/../ucvtw \
55
				-I$(srcdir)/../ucvtw \
55
				-I$(srcdir)/../ucvko \
56
				-I$(srcdir)/../ucvko \
57
				-I$(srcdir)/../ucvcn \
56
				$(NULL)
58
				$(NULL)
57
59
58
60
(-)intl/uconv/ucvcn/Makefile.in (-6 / +3 lines)
Line     Link Here 
 Lines 27-35    Link Here 
27
include $(DEPTH)/config/autoconf.mk
27
include $(DEPTH)/config/autoconf.mk
28
28
29
MODULE		= ucvcn
29
MODULE		= ucvcn
30
LIBRARY_NAME	= ucvcn
30
LIBRARY_NAME	= ucvcn_s
31
EXPORT_LIBRARY = 1
31
FORCE_STATIC_LIB=1
32
IS_COMPONENT	= 1
33
MODULE_NAME	= nsUCvCnModule
32
MODULE_NAME	= nsUCvCnModule
34
REQUIRES	= xpcom \
33
REQUIRES	= xpcom \
35
		  string \
34
		  string \
 Lines 50-63    Link Here 
50
		nsUnicodeToHZ.cpp \
49
		nsUnicodeToHZ.cpp \
51
		nsCP936ToUnicode.cpp \
50
		nsCP936ToUnicode.cpp \
52
		nsUnicodeToCP936.cpp \
51
		nsUnicodeToCP936.cpp \
53
		nsUCvCnSupport.cpp \
54
		nsUCvCnModule.cpp \
55
		nsGBKConvUtil.cpp \
52
		nsGBKConvUtil.cpp \
56
		$(NULL)
53
		$(NULL)
57
54
58
EXPORTS		= nsUCvCnCID.h
55
EXPORTS		= nsUCvCnCID.h
59
56
60
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS)
57
LOCAL_INCLUDES = -I$(srcdir)/../util
61
58
62
include $(topsrcdir)/config/rules.mk
59
include $(topsrcdir)/config/rules.mk
63
60
(-)intl/uconv/ucvcn/nsCP936ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 38-44    Link Here 
38
#ifndef nsCP936ToUnicode_h___
38
#ifndef nsCP936ToUnicode_h___
39
#define nsCP936ToUnicode_h___
39
#define nsCP936ToUnicode_h___
40
40
41
#include "nsUCvCnSupport.h"
41
#include "nsUCSupport.h"
42
42
43
//----------------------------------------------------------------------
43
//----------------------------------------------------------------------
44
// Class nsCP936ToUnicode [declaration]
44
// Class nsCP936ToUnicode [declaration]
(-)intl/uconv/ucvcn/nsGB2312ToUnicodeV2.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsGB2312ToUnicodeV2_h___
39
#ifndef nsGB2312ToUnicodeV2_h___
40
#define nsGB2312ToUnicodeV2_h___
40
#define nsGB2312ToUnicodeV2_h___
41
41
42
#include "nsUCvCnSupport.h"
42
#include "nsUCSupport.h"
43
#include "gbku.h"
43
#include "gbku.h"
44
#include "nsGBKToUnicode.h"
44
#include "nsGBKToUnicode.h"
45
//----------------------------------------------------------------------
45
//----------------------------------------------------------------------
(-)intl/uconv/ucvcn/nsGBKToUnicode.cpp (-29 / +3 lines)
Line     Link Here 
 Lines 62-73    Link Here 
62
  virtual ~nsGBKUnique2BytesToUnicode() 
62
  virtual ~nsGBKUnique2BytesToUnicode() 
63
    { };
63
    { };
64
protected:
64
protected:
65
  NS_IMETHOD GetMaxLength(const char* aSrc, PRInt32 aSrcLength,
66
                          PRInt32 * aDestLength)
67
  {
68
     *aDestLength = aSrcLength;
69
     return NS_OK;
70
  };
71
};
65
};
72
66
73
static PRUint16 g_utGBKUnique2Bytes[] = {
67
static PRUint16 g_utGBKUnique2Bytes[] = {
 Lines 75-81    Link Here 
75
};
69
};
76
nsGBKUnique2BytesToUnicode::nsGBKUnique2BytesToUnicode() 
70
nsGBKUnique2BytesToUnicode::nsGBKUnique2BytesToUnicode() 
77
: nsTableDecoderSupport((uShiftTable*) &g_2BytesShiftTable,
71
: nsTableDecoderSupport((uShiftTable*) &g_2BytesShiftTable,
78
        (uMappingTable*) &g_utGBKUnique2Bytes) 
72
        (uMappingTable*) &g_utGBKUnique2Bytes, 1) 
79
{
73
{
80
}
74
}
81
75
 Lines 89-100    Link Here 
89
  virtual ~nsGB18030Unique2BytesToUnicode() 
83
  virtual ~nsGB18030Unique2BytesToUnicode() 
90
    { };
84
    { };
91
protected:
85
protected:
92
  NS_IMETHOD GetMaxLength(const char* aSrc, PRInt32 aSrcLength,
93
                          PRInt32 * aDestLength)
94
  {
95
     *aDestLength = aSrcLength;
96
     return NS_OK;
97
  };
98
};
86
};
99
87
100
static PRUint16 g_utGB18030Unique2Bytes[] = {
88
static PRUint16 g_utGB18030Unique2Bytes[] = {
 Lines 102-108    Link Here 
102
};
90
};
103
nsGB18030Unique2BytesToUnicode::nsGB18030Unique2BytesToUnicode() 
91
nsGB18030Unique2BytesToUnicode::nsGB18030Unique2BytesToUnicode() 
104
: nsTableDecoderSupport((uShiftTable*) &g_2BytesShiftTable,
92
: nsTableDecoderSupport((uShiftTable*) &g_2BytesShiftTable,
105
        (uMappingTable*) &g_utGB18030Unique2Bytes) 
93
        (uMappingTable*) &g_utGB18030Unique2Bytes, 1) 
106
{
94
{
107
}
95
}
108
96
 Lines 120-131    Link Here 
120
  virtual ~nsGB18030Unique4BytesToUnicode() 
108
  virtual ~nsGB18030Unique4BytesToUnicode() 
121
    { };
109
    { };
122
protected:
110
protected:
123
  NS_IMETHOD GetMaxLength(const char* aSrc, PRInt32 aSrcLength,
124
                          PRInt32 * aDestLength)
125
  {
126
     *aDestLength = aSrcLength;
127
     return NS_OK;
128
  };
129
};
111
};
130
112
131
static PRUint16 g_utGB18030Unique4Bytes[] = {
113
static PRUint16 g_utGB18030Unique4Bytes[] = {
 Lines 133-139    Link Here 
133
};
115
};
134
nsGB18030Unique4BytesToUnicode::nsGB18030Unique4BytesToUnicode() 
116
nsGB18030Unique4BytesToUnicode::nsGB18030Unique4BytesToUnicode() 
135
: nsTableDecoderSupport((uShiftTable*) &g_GB18030_4BytesShiftTable,
117
: nsTableDecoderSupport((uShiftTable*) &g_GB18030_4BytesShiftTable,
136
        (uMappingTable*) &g_utGB18030Unique4Bytes) 
118
        (uMappingTable*) &g_utGB18030Unique4Bytes, 1) 
137
{
119
{
138
}
120
}
139
121
 Lines 143-156    Link Here 
143
125
144
//----------------------------------------------------------------------
126
//----------------------------------------------------------------------
145
// Subclassing of nsTablesDecoderSupport class [implementation]
127
// Subclassing of nsTablesDecoderSupport class [implementation]
146
147
NS_IMETHODIMP nsGBKToUnicode::GetMaxLength(const char * aSrc, 
148
                                              PRInt32 aSrcLength, 
149
                                              PRInt32 * aDestLength)
150
{
151
  *aDestLength = aSrcLength;
152
  return NS_OK;
153
}
154
128
155
#define LEGAL_GBK_MULTIBYTE_FIRST_BYTE(c)  \
129
#define LEGAL_GBK_MULTIBYTE_FIRST_BYTE(c)  \
156
      (UINT8_IN_RANGE(0x81, (c), 0xFE))
130
      (UINT8_IN_RANGE(0x81, (c), 0xFE))
(-)intl/uconv/ucvcn/nsGBKToUnicode.h (-5 / +2 lines)
Line     Link Here 
 Lines 40-46    Link Here 
40
40
41
#include "nsCOMPtr.h"
41
#include "nsCOMPtr.h"
42
#include "nsIUnicodeDecoder.h"
42
#include "nsIUnicodeDecoder.h"
43
#include "nsUCvCnSupport.h"
43
#include "nsUCSupport.h"
44
#include "gbku.h"
44
#include "gbku.h"
45
45
46
//----------------------------------------------------------------------
46
//----------------------------------------------------------------------
 Lines 60-66    Link Here 
60
  /**
60
  /**
61
   * Class constructor.
61
   * Class constructor.
62
   */
62
   */
63
  nsGBKToUnicode()
63
  nsGBKToUnicode() : nsBufferDecoderSupport(1)
64
  {
64
  {
65
    mExtensionDecoder = nsnull;
65
    mExtensionDecoder = nsnull;
66
    m4BytesDecoder = nsnull;
66
    m4BytesDecoder = nsnull;
 Lines 71-79    Link Here 
71
  //--------------------------------------------------------------------
71
  //--------------------------------------------------------------------
72
  // Subclassing of nsDecoderSupport class [declaration]
72
  // Subclassing of nsDecoderSupport class [declaration]
73
  NS_IMETHOD ConvertNoBuff(const char* aSrc, PRInt32 * aSrcLength, PRUnichar *aDest, PRInt32 * aDestLength);
73
  NS_IMETHOD ConvertNoBuff(const char* aSrc, PRInt32 * aSrcLength, PRUnichar *aDest, PRInt32 * aDestLength);
74
75
  NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength, 
76
      PRInt32 * aDestLength);
77
74
78
protected:
75
protected:
79
  nsGBKConvUtil mUtil;
76
  nsGBKConvUtil mUtil;
(-)intl/uconv/ucvcn/nsHZToUnicode.cpp (-8 / +1 lines)
Line     Link Here 
 Lines 69-81    Link Here 
69
//----------------------------------------------------------------------
69
//----------------------------------------------------------------------
70
// Subclassing of nsTablesDecoderSupport class [implementation]
70
// Subclassing of nsTablesDecoderSupport class [implementation]
71
71
72
NS_IMETHODIMP nsHZToUnicode::GetMaxLength(const char * aSrc, 
73
                                              PRInt32 aSrcLength, 
74
                                              PRInt32 * aDestLength)
75
{
76
  *aDestLength = aSrcLength;
77
  return NS_OK;
78
}
79
#define HZ_STATE_GB		1
72
#define HZ_STATE_GB		1
80
#define HZ_STATE_ASCII	2
73
#define HZ_STATE_ASCII	2
81
#define HZ_STATE_TILD	3
74
#define HZ_STATE_TILD	3
 Lines 84-90    Link Here 
84
#define HZLEAD3 '}'
77
#define HZLEAD3 '}'
85
#define HZLEAD4 '\n'
78
#define HZLEAD4 '\n'
86
79
87
nsHZToUnicode::nsHZToUnicode()
80
nsHZToUnicode::nsHZToUnicode() : nsBufferDecoderSupport(1)
88
{
81
{
89
  mHZState = HZ_STATE_ASCII;	// per HZ spec, default to ASCII state 
82
  mHZState = HZ_STATE_ASCII;	// per HZ spec, default to ASCII state 
90
}
83
}
(-)intl/uconv/ucvcn/nsHZToUnicode.h (-3 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsHZToUnicode_h___
39
#ifndef nsHZToUnicode_h___
40
#define nsHZToUnicode_h___
40
#define nsHZToUnicode_h___
41
41
42
#include "nsUCvCnSupport.h"
42
#include "nsUCSupport.h"
43
#include "gbku.h"
43
#include "gbku.h"
44
44
45
//----------------------------------------------------------------------
45
//----------------------------------------------------------------------
 Lines 67-74    Link Here 
67
  // Subclassing of nsDecoderSupport class [declaration]
67
  // Subclassing of nsDecoderSupport class [declaration]
68
  NS_IMETHOD ConvertNoBuff(const char* aSrc, PRInt32 * aSrcLength, 
68
  NS_IMETHOD ConvertNoBuff(const char* aSrc, PRInt32 * aSrcLength, 
69
                           PRUnichar *aDest, PRInt32 * aDestLength); 
69
                           PRUnichar *aDest, PRInt32 * aDestLength); 
70
  NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength, 
71
                           PRInt32 * aDestLength);
72
  nsGBKConvUtil mUtil;
70
  nsGBKConvUtil mUtil;
73
71
74
private:
72
private:
(-)intl/uconv/ucvcn/nsUnicodeToCP936.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToCP936_h___
39
#ifndef nsUnicodeToCP936_h___
40
#define nsUnicodeToCP936_h___
40
#define nsUnicodeToCP936_h___
41
41
42
#include "nsUCvCnSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToCP936 [declaration]
45
// Class nsUnicodeToCP936 [declaration]
(-)intl/uconv/ucvcn/nsUnicodeToGB2312GL.cpp (-9 / +2 lines)
Line     Link Here 
 Lines 46-52    Link Here 
46
//----------------------------------------------------------------------
46
//----------------------------------------------------------------------
47
// Class nsUnicodeToGB2312GL [implementation]
47
// Class nsUnicodeToGB2312GL [implementation]
48
48
49
nsUnicodeToGB2312GL::nsUnicodeToGB2312GL()
49
nsUnicodeToGB2312GL::nsUnicodeToGB2312GL() :
50
  nsEncoderSupport(2)
50
{
51
{
51
  mUtil.InitToGBKTable();
52
  mUtil.InitToGBKTable();
52
}
53
}
 Lines 94-107    Link Here 
94
95
95
//----------------------------------------------------------------------
96
//----------------------------------------------------------------------
96
// Subclassing of nsTableEncoderSupport class [implementation]
97
// Subclassing of nsTableEncoderSupport class [implementation]
97
98
NS_IMETHODIMP nsUnicodeToGB2312GL::GetMaxLength(const PRUnichar * aSrc, 
99
                                              PRInt32 aSrcLength,
100
                                              PRInt32 * aDestLength)
101
{
102
  *aDestLength = 2 * aSrcLength;
103
  return NS_OK;
104
}
105
98
106
NS_IMETHODIMP nsUnicodeToGB2312GL::FillInfo(PRUint32 *aInfo)
99
NS_IMETHODIMP nsUnicodeToGB2312GL::FillInfo(PRUint32 *aInfo)
107
{
100
{
(-)intl/uconv/ucvcn/nsUnicodeToGB2312GL.h (-4 / +1 lines)
Line     Link Here 
 Lines 40-46    Link Here 
40
#ifndef nsUnicodeToGB2312GL_h___
40
#ifndef nsUnicodeToGB2312GL_h___
41
#define nsUnicodeToGB2312GL_h___
41
#define nsUnicodeToGB2312GL_h___
42
42
43
#include "nsUCvCnSupport.h"
43
#include "nsUCSupport.h"
44
#include "gbku.h"
44
#include "gbku.h"
45
//----------------------------------------------------------------------
45
//----------------------------------------------------------------------
46
// Class nsUnicodeToGB2312GL [declaration]
46
// Class nsUnicodeToGB2312GL [declaration]
 Lines 69-77    Link Here 
69
69
70
  //--------------------------------------------------------------------
70
  //--------------------------------------------------------------------
71
  // Subclassing of nsEncoderSupport class [declaration]
71
  // Subclassing of nsEncoderSupport class [declaration]
72
73
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
74
      PRInt32 * aDestLength);
75
72
76
  NS_IMETHOD ConvertNoBuffNoErr(const PRUnichar * aSrc, PRInt32 * aSrcLength, 
73
  NS_IMETHOD ConvertNoBuffNoErr(const PRUnichar * aSrc, PRInt32 * aSrcLength, 
77
                                char * aDest, PRInt32 * aDestLength)
74
                                char * aDest, PRInt32 * aDestLength)
(-)intl/uconv/ucvcn/nsUnicodeToGB2312V2.cpp (-9 / +2 lines)
Line     Link Here 
 Lines 44-50    Link Here 
44
44
45
//----------------------------------------------------------------------
45
//----------------------------------------------------------------------
46
// Class nsUnicodeToGB2312V2 [implementation]
46
// Class nsUnicodeToGB2312V2 [implementation]
47
nsUnicodeToGB2312V2::nsUnicodeToGB2312V2()
47
nsUnicodeToGB2312V2::nsUnicodeToGB2312V2() :
48
  nsEncoderSupport(2)
48
{
49
{
49
  mUtil.InitToGBKTable();
50
  mUtil.InitToGBKTable();
50
}
51
}
 Lines 102-115    Link Here 
102
103
103
//----------------------------------------------------------------------
104
//----------------------------------------------------------------------
104
// Subclassing of nsTableEncoderSupport class [implementation]
105
// Subclassing of nsTableEncoderSupport class [implementation]
105
106
NS_IMETHODIMP nsUnicodeToGB2312V2::GetMaxLength(const PRUnichar * aSrc, 
107
                                              PRInt32 aSrcLength,
108
                                              PRInt32 * aDestLength)
109
{
110
  *aDestLength = 2 * aSrcLength;
111
  return NS_OK;
112
}
113
106
114
NS_IMETHODIMP nsUnicodeToGB2312V2::FillInfo(PRUint32 *aInfo)
107
NS_IMETHODIMP nsUnicodeToGB2312V2::FillInfo(PRUint32 *aInfo)
115
{
108
{
(-)intl/uconv/ucvcn/nsUnicodeToGB2312V2.h (-4 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToGB2312V2_h___
39
#ifndef nsUnicodeToGB2312V2_h___
40
#define nsUnicodeToGB2312V2_h___
40
#define nsUnicodeToGB2312V2_h___
41
41
42
#include "nsUCvCnSupport.h"
42
#include "nsUCSupport.h"
43
#include "gbku.h"
43
#include "gbku.h"
44
44
45
//----------------------------------------------------------------------
45
//----------------------------------------------------------------------
 Lines 69-77    Link Here 
69
69
70
  //--------------------------------------------------------------------
70
  //--------------------------------------------------------------------
71
  // Subclassing of nsEncoderSupport class [declaration]
71
  // Subclassing of nsEncoderSupport class [declaration]
72
73
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
74
      PRInt32 * aDestLength);
75
72
76
  NS_IMETHOD ConvertNoBuffNoErr(const PRUnichar * aSrc, PRInt32 * aSrcLength, 
73
  NS_IMETHOD ConvertNoBuffNoErr(const PRUnichar * aSrc, PRInt32 * aSrcLength, 
77
                                char * aDest, PRInt32 * aDestLength)
74
                                char * aDest, PRInt32 * aDestLength)
(-)intl/uconv/ucvcn/nsUnicodeToGBK.cpp (-50 / +7 lines)
Line     Link Here 
 Lines 78-92    Link Here 
78
public: 
78
public: 
79
  nsUnicodeToGB18030Uniq2Bytes() 
79
  nsUnicodeToGB18030Uniq2Bytes() 
80
    : nsTableEncoderSupport((uShiftTable*) &g_2BytesShiftTable,
80
    : nsTableEncoderSupport((uShiftTable*) &g_2BytesShiftTable,
81
                            (uMappingTable*) &g_uf_gb18030_2bytes) {};
81
                            (uMappingTable*) &g_uf_gb18030_2bytes, 2) {};
82
protected: 
82
protected: 
83
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, 
84
                                PRInt32 aSrcLength,
85
                                PRInt32 * aDestLength)
86
  {
87
    *aDestLength = 2 * aSrcLength;
88
    return NS_OK;
89
  };
90
};
83
};
91
//-----------------------------------------------------------------------
84
//-----------------------------------------------------------------------
92
//  Private class used by nsUnicodeToGB18030
85
//  Private class used by nsUnicodeToGB18030
 Lines 100-114    Link Here 
100
public: 
93
public: 
101
  nsUnicodeTo4BytesGB18030()
94
  nsUnicodeTo4BytesGB18030()
102
    : nsTableEncoderSupport( (uShiftTable*) &g_4BytesGB18030ShiftTable,
95
    : nsTableEncoderSupport( (uShiftTable*) &g_4BytesGB18030ShiftTable,
103
                             (uMappingTable*) &g_uf_gb18030_4bytes) {};
96
                             (uMappingTable*) &g_uf_gb18030_4bytes, 4) {};
104
protected: 
97
protected: 
105
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, 
106
                                PRInt32 aSrcLength,
107
                                PRInt32 * aDestLength)
108
  {
109
    *aDestLength = 4 * aSrcLength;
110
    return NS_OK_UDEC_EXACTLENGTH;
111
  };
112
};
98
};
113
//-----------------------------------------------------------------------
99
//-----------------------------------------------------------------------
114
//  Private class used by nsUnicodeToGBK
100
//  Private class used by nsUnicodeToGBK
 Lines 122-136    Link Here 
122
public: 
108
public: 
123
  nsUnicodeToGBKUniq2Bytes()
109
  nsUnicodeToGBKUniq2Bytes()
124
    : nsTableEncoderSupport( (uShiftTable*) &g_2BytesShiftTable,
110
    : nsTableEncoderSupport( (uShiftTable*) &g_2BytesShiftTable,
125
                             (uMappingTable*) &g_uf_gbk_2bytes) {};
111
                             (uMappingTable*) &g_uf_gbk_2bytes, 2) {};
126
protected: 
112
protected: 
127
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, 
128
                                PRInt32 aSrcLength,
129
                                PRInt32 * aDestLength)
130
  {
131
    *aDestLength = 2 * aSrcLength;
132
    return NS_OK_UDEC_EXACTLENGTH;
133
  };
134
};
113
};
135
//-----------------------------------------------------------------------
114
//-----------------------------------------------------------------------
136
//  nsUnicodeToGB18030
115
//  nsUnicodeToGB18030
 Lines 143-155    Link Here 
143
{
122
{
144
  m4BytesEncoder = new nsUnicodeTo4BytesGB18030();
123
  m4BytesEncoder = new nsUnicodeTo4BytesGB18030();
145
}
124
}
146
NS_IMETHODIMP nsUnicodeToGB18030::GetMaxLength(const PRUnichar * aSrc, 
125
147
                                              PRInt32 aSrcLength,
148
                                              PRInt32 * aDestLength)
149
{
150
  *aDestLength = 4 * aSrcLength;
151
  return NS_OK;
152
}
153
PRBool nsUnicodeToGB18030::EncodeSurrogate(
126
PRBool nsUnicodeToGB18030::EncodeSurrogate(
154
  PRUnichar aSurrogateHigh,
127
  PRUnichar aSurrogateHigh,
155
  PRUnichar aSurrogateLow,
128
  PRUnichar aSurrogateLow,
 Lines 205-223    Link Here 
205
//-----------------------------------------------------------------------
178
//-----------------------------------------------------------------------
206
nsUnicodeToGB18030Font1::nsUnicodeToGB18030Font1()
179
nsUnicodeToGB18030Font1::nsUnicodeToGB18030Font1()
207
    : nsTableEncoderSupport( (uShiftTable*) &g_2BytesShiftTable,
180
    : nsTableEncoderSupport( (uShiftTable*) &g_2BytesShiftTable,
208
                             (uMappingTable*) &g_uf_gb18030_4bytes)
181
                             (uMappingTable*) &g_uf_gb18030_4bytes, 4)
209
{
182
{
210
183
211
}
184
}
212
185
213
NS_IMETHODIMP nsUnicodeToGB18030Font1::GetMaxLength(const PRUnichar * aSrc, 
214
                                              PRInt32 aSrcLength,
215
                                              PRInt32 * aDestLength)
216
{
217
  *aDestLength = 4 * aSrcLength;
218
  return NS_OK_UDEC_EXACTLENGTH; // font encoding is exactly 4 bytes
219
}
220
221
NS_IMETHODIMP nsUnicodeToGB18030Font1::FillInfo(PRUint32 *aInfo)
186
NS_IMETHODIMP nsUnicodeToGB18030Font1::FillInfo(PRUint32 *aInfo)
222
{
187
{
223
  nsresult res = nsTableEncoderSupport::FillInfo(aInfo);
188
  nsresult res = nsTableEncoderSupport::FillInfo(aInfo);
 Lines 357-363    Link Here 
357
//----------------------------------------------------------------------
322
//----------------------------------------------------------------------
358
// Class nsUnicodeToGBK [implementation]
323
// Class nsUnicodeToGBK [implementation]
359
324
360
nsUnicodeToGBK::nsUnicodeToGBK()
325
nsUnicodeToGBK::nsUnicodeToGBK(PRUint32 aMaxLength) :
326
  nsEncoderSupport(aMaxLength)
361
{
327
{
362
  mExtensionEncoder = nsnull;
328
  mExtensionEncoder = nsnull;
363
  m4BytesEncoder = nsnull;
329
  m4BytesEncoder = nsnull;
 Lines 561-575    Link Here 
561
527
562
//----------------------------------------------------------------------
528
//----------------------------------------------------------------------
563
// Subclassing of nsTableEncoderSupport class [implementation]
529
// Subclassing of nsTableEncoderSupport class [implementation]
564
565
NS_IMETHODIMP nsUnicodeToGBK::GetMaxLength(const PRUnichar * aSrc, 
566
                                              PRInt32 aSrcLength,
567
                                              PRInt32 * aDestLength)
568
{
569
  *aDestLength = 2 * aSrcLength;
570
  return NS_OK;
571
}
572
573
530
574
NS_IMETHODIMP nsUnicodeToGBK::FillInfo(PRUint32 *aInfo)
531
NS_IMETHODIMP nsUnicodeToGBK::FillInfo(PRUint32 *aInfo)
575
{
532
{
(-)intl/uconv/ucvcn/nsUnicodeToGBK.h (-11 / +3 lines)
Line     Link Here 
 Lines 47-53    Link Here 
47
#ifndef nsUnicodeToGBK_h___
47
#ifndef nsUnicodeToGBK_h___
48
#define nsUnicodeToGBK_h___
48
#define nsUnicodeToGBK_h___
49
49
50
#include "nsUCvCnSupport.h"
50
#include "nsUCSupport.h"
51
#include "nsCOMPtr.h"
51
#include "nsCOMPtr.h"
52
#include "nsIUnicodeEncoder.h"
52
#include "nsIUnicodeEncoder.h"
53
#include "gbku.h"
53
#include "gbku.h"
 Lines 61-67    Link Here 
61
  /**
61
  /**
62
   * Class constructor.
62
   * Class constructor.
63
   */
63
   */
64
  nsUnicodeToGBK();
64
  nsUnicodeToGBK(PRUint32 aMaxLengthFactor = 2);
65
  virtual ~nsUnicodeToGBK() {};
65
  virtual ~nsUnicodeToGBK() {};
66
66
67
protected:
67
protected:
 Lines 73-81    Link Here 
73
                            char * aDest, 
73
                            char * aDest, 
74
                            PRInt32 * aDestLength);
74
                            PRInt32 * aDestLength);
75
75
76
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
77
      PRInt32 * aDestLength);
78
79
  NS_IMETHOD ConvertNoBuffNoErr(const PRUnichar * aSrc, PRInt32 * aSrcLength, 
76
  NS_IMETHOD ConvertNoBuffNoErr(const PRUnichar * aSrc, PRInt32 * aSrcLength, 
80
                                char * aDest, PRInt32 * aDestLength)
77
                                char * aDest, PRInt32 * aDestLength)
81
  {
78
  {
 Lines 100-110    Link Here 
100
class nsUnicodeToGB18030: public nsUnicodeToGBK
97
class nsUnicodeToGB18030: public nsUnicodeToGBK
101
{
98
{
102
public:
99
public:
103
  nsUnicodeToGB18030() {};
100
  nsUnicodeToGB18030() : nsUnicodeToGBK(4) {};
104
  virtual ~nsUnicodeToGB18030() {};
101
  virtual ~nsUnicodeToGB18030() {};
105
protected:
102
protected:
106
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
107
      PRInt32 * aDestLength);
108
  virtual void CreateExtensionEncoder();
103
  virtual void CreateExtensionEncoder();
109
  virtual void Create4BytesEncoder();
104
  virtual void Create4BytesEncoder();
110
  virtual PRBool EncodeSurrogate(PRUnichar aSurrogateHigh, PRUnichar aSurrogateLow, char* aDest);
105
  virtual PRBool EncodeSurrogate(PRUnichar aSurrogateHigh, PRUnichar aSurrogateLow, char* aDest);
 Lines 127-135    Link Here 
127
  nsUnicodeToGB18030Font1();
122
  nsUnicodeToGB18030Font1();
128
  virtual ~nsUnicodeToGB18030Font1() {};
123
  virtual ~nsUnicodeToGB18030Font1() {};
129
protected: 
124
protected: 
130
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, 
131
                                PRInt32 aSrcLength,
132
                                PRInt32 * aDestLength);
133
  NS_IMETHOD FillInfo(PRUint32 *aInfo);
125
  NS_IMETHOD FillInfo(PRUint32 *aInfo);
134
};
126
};
135
127
(-)intl/uconv/ucvcn/nsUnicodeToHZ.cpp (-10 / +1 lines)
Line     Link Here 
 Lines 58-64    Link Here 
58
#define HZLEAD2 '{'
58
#define HZLEAD2 '{'
59
#define HZLEAD3 '}'
59
#define HZLEAD3 '}'
60
#define UNICODE_TILD	0x007E
60
#define UNICODE_TILD	0x007E
61
nsUnicodeToHZ::nsUnicodeToHZ()
61
nsUnicodeToHZ::nsUnicodeToHZ() : nsEncoderSupport(6)
62
{
62
{
63
  mUtil.InitToGBKTable();
63
  mUtil.InitToGBKTable();
64
  mHZState = HZ_STATE_ASCII;	// per HZ spec, default to HZ mode
64
  mHZState = HZ_STATE_ASCII;	// per HZ spec, default to HZ mode
 Lines 140-153    Link Here 
140
  //GB2312 font lib also have single byte ASCII characters, set them here
140
  //GB2312 font lib also have single byte ASCII characters, set them here
141
  for ( PRUint16 u = 0x0000; u <= 0x007F; u++)
141
  for ( PRUint16 u = 0x0000; u <= 0x007F; u++)
142
    SET_REPRESENTABLE(aInfo, u);
142
    SET_REPRESENTABLE(aInfo, u);
143
  return NS_OK;
144
}
145
//----------------------------------------------------------------------
146
// Subclassing of nsTableEncoderSupport class [implementation]
147
NS_IMETHODIMP nsUnicodeToHZ::GetMaxLength(const PRUnichar * aSrc, 
148
                                              PRInt32 aSrcLength,
149
                                              PRInt32 * aDestLength)
150
{
151
  *aDestLength = 6 * aSrcLength;
152
  return NS_OK;
143
  return NS_OK;
153
}
144
}
(-)intl/uconv/ucvcn/nsUnicodeToHZ.h (-4 / +1 lines)
Line     Link Here 
 Lines 47-53    Link Here 
47
#ifndef nsUnicodeToHZ_h___
47
#ifndef nsUnicodeToHZ_h___
48
#define nsUnicodeToHZ_h___
48
#define nsUnicodeToHZ_h___
49
49
50
#include "nsUCvCnSupport.h"
50
#include "nsUCSupport.h"
51
#include "gbku.h"
51
#include "gbku.h"
52
//----------------------------------------------------------------------
52
//----------------------------------------------------------------------
53
// Class nsUnicodeToHZ [declaration]
53
// Class nsUnicodeToHZ [declaration]
 Lines 77-85    Link Here 
77
  {
77
  {
78
    return NS_OK;
78
    return NS_OK;
79
  };  // just make it not abstract;
79
  };  // just make it not abstract;
80
81
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
82
      PRInt32 * aDestLength);
83
80
84
  PRUint16 mHZState;
81
  PRUint16 mHZState;
85
protected:
82
protected:
(-)intl/uconv/ucvibm/Makefile.in (-6 / +3 lines)
Line     Link Here 
 Lines 38-46    Link Here 
38
include $(DEPTH)/config/autoconf.mk
38
include $(DEPTH)/config/autoconf.mk
39
39
40
MODULE		= ucvibm
40
MODULE		= ucvibm
41
LIBRARY_NAME	= ucvibm
41
LIBRARY_NAME	= ucvibm_s
42
EXPORT_LIBRARY = 1
42
FORCE_STATIC_LIB = 1
43
IS_COMPONENT	= 1
44
MODULE_NAME	= nsUCvIBMModule
43
MODULE_NAME	= nsUCvIBMModule
45
REQUIRES	= xpcom \
44
REQUIRES	= xpcom \
46
		  string \
45
		  string \
 Lines 62-74    Link Here 
62
		nsUnicodeToCP862.cpp \
61
		nsUnicodeToCP862.cpp \
63
		nsUnicodeToCP864.cpp \
62
		nsUnicodeToCP864.cpp \
64
		nsUnicodeToCP864i.cpp \
63
		nsUnicodeToCP864i.cpp \
65
		nsUCvIBMSupport.cpp \
66
		nsUCvIBMModule.cpp \
67
		$(NULL)
64
		$(NULL)
68
65
69
EXPORTS		= nsUCvIBMCID.h
66
EXPORTS		= nsUCvIBMCID.h
70
67
71
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS)
68
LOCAL_INCLUDES = -I$(srcdir)/../util
72
69
73
ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
70
ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
74
ifeq ($(MOZ_OS2_TOOLS),VACPP)
71
ifeq ($(MOZ_OS2_TOOLS),VACPP)
(-)intl/uconv/ucvibm/nsCP850ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 36-42    Link Here 
36
#ifndef nsCP850ToUnicode_h___
36
#ifndef nsCP850ToUnicode_h___
37
#define nsCP850ToUnicode_h___
37
#define nsCP850ToUnicode_h___
38
38
39
#include "nsUCvIBMSupport.h"
39
#include "nsUCSupport.h"
40
40
41
//----------------------------------------------------------------------
41
//----------------------------------------------------------------------
42
// Class nsCP850ToUnicode [declaration]
42
// Class nsCP850ToUnicode [declaration]
(-)intl/uconv/ucvibm/nsCP852ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 36-42    Link Here 
36
#ifndef nsCP852ToUnicode_h___
36
#ifndef nsCP852ToUnicode_h___
37
#define nsCP852ToUnicode_h___
37
#define nsCP852ToUnicode_h___
38
38
39
#include "nsUCvIBMSupport.h"
39
#include "nsUCSupport.h"
40
40
41
//----------------------------------------------------------------------
41
//----------------------------------------------------------------------
42
// Class nsCP852ToUnicode [declaration]
42
// Class nsCP852ToUnicode [declaration]
(-)intl/uconv/ucvibm/nsCP855ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 36-42    Link Here 
36
#ifndef nsCP855ToUnicode_h___
36
#ifndef nsCP855ToUnicode_h___
37
#define nsCP855ToUnicode_h___
37
#define nsCP855ToUnicode_h___
38
38
39
#include "nsUCvIBMSupport.h"
39
#include "nsUCSupport.h"
40
40
41
//----------------------------------------------------------------------
41
//----------------------------------------------------------------------
42
// Class nsCP855ToUnicode [declaration]
42
// Class nsCP855ToUnicode [declaration]
(-)intl/uconv/ucvibm/nsCP857ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 36-42    Link Here 
36
#ifndef nsCP857ToUnicode_h___
36
#ifndef nsCP857ToUnicode_h___
37
#define nsCP857ToUnicode_h___
37
#define nsCP857ToUnicode_h___
38
38
39
#include "nsUCvIBMSupport.h"
39
#include "nsUCSupport.h"
40
40
41
//----------------------------------------------------------------------
41
//----------------------------------------------------------------------
42
// Class nsCP857ToUnicode [declaration]
42
// Class nsCP857ToUnicode [declaration]
(-)intl/uconv/ucvibm/nsCP862ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 36-42    Link Here 
36
#ifndef nsCP862ToUnicode_h___
36
#ifndef nsCP862ToUnicode_h___
37
#define nsCP862ToUnicode_h___
37
#define nsCP862ToUnicode_h___
38
38
39
#include "nsUCvIBMSupport.h"
39
#include "nsUCSupport.h"
40
40
41
//----------------------------------------------------------------------
41
//----------------------------------------------------------------------
42
// Class nsCP862ToUnicode [declaration]
42
// Class nsCP862ToUnicode [declaration]
(-)intl/uconv/ucvibm/nsCP864ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 36-42    Link Here 
36
#ifndef nsCP864ToUnicode_h___
36
#ifndef nsCP864ToUnicode_h___
37
#define nsCP864ToUnicode_h___
37
#define nsCP864ToUnicode_h___
38
38
39
#include "nsUCvIBMSupport.h"
39
#include "nsUCSupport.h"
40
40
41
//----------------------------------------------------------------------
41
//----------------------------------------------------------------------
42
// Class nsCP864ToUnicode [declaration]
42
// Class nsCP864ToUnicode [declaration]
(-)intl/uconv/ucvibm/nsCP864iToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 74-80    Link Here 
74
74
75
75
76
76
77
#include "nsUCvIBMSupport.h"
77
#include "nsUCSupport.h"
78
78
79
79
80
80
(-)intl/uconv/ucvibm/nsUnicodeToCP850.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 52-68    Link Here 
52
52
53
nsUnicodeToCP850::nsUnicodeToCP850() 
53
nsUnicodeToCP850::nsUnicodeToCP850() 
54
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
54
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
55
                        (uMappingTable*) &g_ufMappingTable)
55
                        (uMappingTable*) &g_ufMappingTable, 1)
56
{
56
{
57
}
57
}
58
58
59
//----------------------------------------------------------------------
60
// Subclassing of nsTableEncoderSupport class [implementation]
61
62
NS_IMETHODIMP nsUnicodeToCP850::GetMaxLength(const PRUnichar * aSrc, 
63
                                              PRInt32 aSrcLength,
64
                                              PRInt32 * aDestLength)
65
{
66
  *aDestLength = aSrcLength;
67
  return NS_OK_UENC_EXACTLENGTH;
68
}
(-)intl/uconv/ucvibm/nsUnicodeToCP850.h (-9 / +1 lines)
Line     Link Here 
 Lines 36-42    Link Here 
36
#ifndef nsUnicodeToCP850_h___
36
#ifndef nsUnicodeToCP850_h___
37
#define nsUnicodeToCP850_h___
37
#define nsUnicodeToCP850_h___
38
38
39
#include "nsUCvIBMSupport.h"
39
#include "nsUCSupport.h"
40
40
41
//----------------------------------------------------------------------
41
//----------------------------------------------------------------------
42
// Class nsUnicodeToCP850 [declaration]
42
// Class nsUnicodeToCP850 [declaration]
 Lines 52-65    Link Here 
52
   * Class constructor.
52
   * Class constructor.
53
   */
53
   */
54
  nsUnicodeToCP850();
54
  nsUnicodeToCP850();
55
56
protected:
57
58
  //--------------------------------------------------------------------
59
  // Subclassing of nsEncoderSupport class [declaration]
60
61
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
62
      PRInt32 * aDestLength);
63
};
55
};
64
56
65
#endif /* nsUnicodeToCP850_h___ */
57
#endif /* nsUnicodeToCP850_h___ */
(-)intl/uconv/ucvibm/nsUnicodeToCP852.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 52-68    Link Here 
52
52
53
nsUnicodeToCP852::nsUnicodeToCP852() 
53
nsUnicodeToCP852::nsUnicodeToCP852() 
54
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
54
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
55
                        (uMappingTable*) &g_ufMappingTable)
55
                        (uMappingTable*) &g_ufMappingTable, 1)
56
{
56
{
57
}
57
}
58
58
59
//----------------------------------------------------------------------
60
// Subclassing of nsTableEncoderSupport class [implementation]
61
62
NS_IMETHODIMP nsUnicodeToCP852::GetMaxLength(const PRUnichar * aSrc, 
63
                                              PRInt32 aSrcLength,
64
                                              PRInt32 * aDestLength)
65
{
66
  *aDestLength = aSrcLength;
67
  return NS_OK_UENC_EXACTLENGTH;
68
}
(-)intl/uconv/ucvibm/nsUnicodeToCP852.h (-8 / +1 lines)
Line     Link Here 
 Lines 36-42    Link Here 
36
#ifndef nsUnicodeToCP852_h___
36
#ifndef nsUnicodeToCP852_h___
37
#define nsUnicodeToCP852_h___
37
#define nsUnicodeToCP852_h___
38
38
39
#include "nsUCvIBMSupport.h"
39
#include "nsUCSupport.h"
40
40
41
//----------------------------------------------------------------------
41
//----------------------------------------------------------------------
42
// Class nsUnicodeToCP852 [declaration]
42
// Class nsUnicodeToCP852 [declaration]
 Lines 53-65    Link Here 
53
   */
53
   */
54
  nsUnicodeToCP852();
54
  nsUnicodeToCP852();
55
55
56
protected:
57
58
  //--------------------------------------------------------------------
59
  // Subclassing of nsEncoderSupport class [declaration]
60
61
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
62
      PRInt32 * aDestLength);
63
};
56
};
64
57
65
#endif /* nsUnicodeToCP852_h___ */
58
#endif /* nsUnicodeToCP852_h___ */
(-)intl/uconv/ucvibm/nsUnicodeToCP855.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 52-68    Link Here 
52
52
53
nsUnicodeToCP855::nsUnicodeToCP855() 
53
nsUnicodeToCP855::nsUnicodeToCP855() 
54
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
54
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
55
                        (uMappingTable*) &g_ufMappingTable)
55
                        (uMappingTable*) &g_ufMappingTable, 1)
56
{
56
{
57
}
57
}
58
58
59
//----------------------------------------------------------------------
60
// Subclassing of nsTableEncoderSupport class [implementation]
61
62
NS_IMETHODIMP nsUnicodeToCP855::GetMaxLength(const PRUnichar * aSrc, 
63
                                              PRInt32 aSrcLength,
64
                                              PRInt32 * aDestLength)
65
{
66
  *aDestLength = aSrcLength;
67
  return NS_OK_UENC_EXACTLENGTH;
68
}
(-)intl/uconv/ucvibm/nsUnicodeToCP855.h (-8 / +1 lines)
Line     Link Here 
 Lines 36-42    Link Here 
36
#ifndef nsUnicodeToCP855_h___
36
#ifndef nsUnicodeToCP855_h___
37
#define nsUnicodeToCP855_h___
37
#define nsUnicodeToCP855_h___
38
38
39
#include "nsUCvIBMSupport.h"
39
#include "nsUCSupport.h"
40
40
41
//----------------------------------------------------------------------
41
//----------------------------------------------------------------------
42
// Class nsUnicodeToCP855 [declaration]
42
// Class nsUnicodeToCP855 [declaration]
 Lines 53-65    Link Here 
53
   */
53
   */
54
  nsUnicodeToCP855();
54
  nsUnicodeToCP855();
55
55
56
protected:
57
58
  //--------------------------------------------------------------------
59
  // Subclassing of nsEncoderSupport class [declaration]
60
61
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
62
      PRInt32 * aDestLength);
63
};
56
};
64
57
65
#endif /* nsUnicodeToCP855_h___ */
58
#endif /* nsUnicodeToCP855_h___ */
(-)intl/uconv/ucvibm/nsUnicodeToCP857.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 52-68    Link Here 
52
52
53
nsUnicodeToCP857::nsUnicodeToCP857() 
53
nsUnicodeToCP857::nsUnicodeToCP857() 
54
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
54
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
55
                        (uMappingTable*) &g_ufMappingTable)
55
                        (uMappingTable*) &g_ufMappingTable, 1)
56
{
56
{
57
}
57
}
58
58
59
//----------------------------------------------------------------------
60
// Subclassing of nsTableEncoderSupport class [implementation]
61
62
NS_IMETHODIMP nsUnicodeToCP857::GetMaxLength(const PRUnichar * aSrc, 
63
                                              PRInt32 aSrcLength,
64
                                              PRInt32 * aDestLength)
65
{
66
  *aDestLength = aSrcLength;
67
  return NS_OK_UENC_EXACTLENGTH;
68
}
(-)intl/uconv/ucvibm/nsUnicodeToCP857.h (-8 / +1 lines)
Line     Link Here 
 Lines 36-42    Link Here 
36
#ifndef nsUnicodeToCP857_h___
36
#ifndef nsUnicodeToCP857_h___
37
#define nsUnicodeToCP857_h___
37
#define nsUnicodeToCP857_h___
38
38
39
#include "nsUCvIBMSupport.h"
39
#include "nsUCSupport.h"
40
40
41
//----------------------------------------------------------------------
41
//----------------------------------------------------------------------
42
// Class nsUnicodeToCP857 [declaration]
42
// Class nsUnicodeToCP857 [declaration]
 Lines 53-65    Link Here 
53
   */
53
   */
54
  nsUnicodeToCP857();
54
  nsUnicodeToCP857();
55
55
56
protected:
57
58
  //--------------------------------------------------------------------
59
  // Subclassing of nsEncoderSupport class [declaration]
60
61
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
62
      PRInt32 * aDestLength);
63
};
56
};
64
57
65
#endif /* nsUnicodeToCP857_h___ */
58
#endif /* nsUnicodeToCP857_h___ */
(-)intl/uconv/ucvibm/nsUnicodeToCP862.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 52-68    Link Here 
52
52
53
nsUnicodeToCP862::nsUnicodeToCP862() 
53
nsUnicodeToCP862::nsUnicodeToCP862() 
54
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
54
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
55
                        (uMappingTable*) &g_ufMappingTable)
55
                        (uMappingTable*) &g_ufMappingTable, 1)
56
{
56
{
57
}
57
}
58
58
59
//----------------------------------------------------------------------
60
// Subclassing of nsTableEncoderSupport class [implementation]
61
62
NS_IMETHODIMP nsUnicodeToCP862::GetMaxLength(const PRUnichar * aSrc, 
63
                                              PRInt32 aSrcLength,
64
                                              PRInt32 * aDestLength)
65
{
66
  *aDestLength = aSrcLength;
67
  return NS_OK_UENC_EXACTLENGTH;
68
}
(-)intl/uconv/ucvibm/nsUnicodeToCP862.h (-8 / +1 lines)
Line     Link Here 
 Lines 36-42    Link Here 
36
#ifndef nsUnicodeToCP862_h___
36
#ifndef nsUnicodeToCP862_h___
37
#define nsUnicodeToCP862_h___
37
#define nsUnicodeToCP862_h___
38
38
39
#include "nsUCvIBMSupport.h"
39
#include "nsUCSupport.h"
40
40
41
//----------------------------------------------------------------------
41
//----------------------------------------------------------------------
42
// Class nsUnicodeToCP862 [declaration]
42
// Class nsUnicodeToCP862 [declaration]
 Lines 53-65    Link Here 
53
   */
53
   */
54
  nsUnicodeToCP862();
54
  nsUnicodeToCP862();
55
55
56
protected:
57
58
  //--------------------------------------------------------------------
59
  // Subclassing of nsEncoderSupport class [declaration]
60
61
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
62
      PRInt32 * aDestLength);
63
};
56
};
64
57
65
#endif /* nsUnicodeToCP862_h___ */
58
#endif /* nsUnicodeToCP862_h___ */
(-)intl/uconv/ucvibm/nsUnicodeToCP864.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 52-68    Link Here 
52
52
53
nsUnicodeToCP864::nsUnicodeToCP864() 
53
nsUnicodeToCP864::nsUnicodeToCP864() 
54
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
54
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
55
                        (uMappingTable*) &g_ufMappingTable)
55
                        (uMappingTable*) &g_ufMappingTable, 1)
56
{
56
{
57
}
57
}
58
58
59
//----------------------------------------------------------------------
60
// Subclassing of nsTableEncoderSupport class [implementation]
61
62
NS_IMETHODIMP nsUnicodeToCP864::GetMaxLength(const PRUnichar * aSrc, 
63
                                              PRInt32 aSrcLength,
64
                                              PRInt32 * aDestLength)
65
{
66
  *aDestLength = aSrcLength;
67
  return NS_OK_UENC_EXACTLENGTH;
68
}
(-)intl/uconv/ucvibm/nsUnicodeToCP864.h (-8 / +1 lines)
Line     Link Here 
 Lines 36-42    Link Here 
36
#ifndef nsUnicodeToCP864_h___
36
#ifndef nsUnicodeToCP864_h___
37
#define nsUnicodeToCP864_h___
37
#define nsUnicodeToCP864_h___
38
38
39
#include "nsUCvIBMSupport.h"
39
#include "nsUCSupport.h"
40
40
41
//----------------------------------------------------------------------
41
//----------------------------------------------------------------------
42
// Class nsUnicodeToCP864 [declaration]
42
// Class nsUnicodeToCP864 [declaration]
 Lines 53-65    Link Here 
53
   */
53
   */
54
  nsUnicodeToCP864();
54
  nsUnicodeToCP864();
55
55
56
protected:
57
58
  //--------------------------------------------------------------------
59
  // Subclassing of nsEncoderSupport class [declaration]
60
61
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
62
      PRInt32 * aDestLength);
63
};
56
};
64
57
65
#endif /* nsUnicodeToCP864_h___ */
58
#endif /* nsUnicodeToCP864_h___ */
(-)intl/uconv/ucvibm/nsUnicodeToCP864i.cpp (-69 / +1 lines)
Line     Link Here 
 Lines 1-79    Link Here 
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2
3
 *
2
 *
4
5
 * The contents of this file are subject to the Netscape Public
3
 * The contents of this file are subject to the Netscape Public
6
7
 * License Version 1.1 (the "License"); you may not use this file
4
 * License Version 1.1 (the "License"); you may not use this file
8
9
 * except in compliance with the License. You may obtain a copy of
5
 * except in compliance with the License. You may obtain a copy of
10
11
 * the License at http://www.mozilla.org/NPL/
6
 * the License at http://www.mozilla.org/NPL/
12
13
 *
7
 *
14
15
 * Software distributed under the License is distributed on an "AS
8
 * Software distributed under the License is distributed on an "AS
16
17
 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9
 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
18
19
 * implied. See the License for the specific language governing
10
 * implied. See the License for the specific language governing
20
21
 * rights and limitations under the License.
11
 * rights and limitations under the License.
22
23
 *
12
 *
24
25
 * The Original Code is Mozilla Communicator client code.
13
 * The Original Code is Mozilla Communicator client code.
26
27
 *
14
 *
28
29
 * The Initial Developer of the Original Code is Netscape Communications
15
 * The Initial Developer of the Original Code is Netscape Communications
30
31
 * Corporation.  Portions created by Netscape are
16
 * Corporation.  Portions created by Netscape are
32
33
 * Copyright (C) 1998 Netscape Communications Corporation. All
17
 * Copyright (C) 1998 Netscape Communications Corporation. All
34
35
 * Rights Reserved.
18
 * Rights Reserved.
36
37
 *
19
 *
38
39
 * Contributor(s): 
20
 * Contributor(s): 
40
41
 * IBM Corporation
21
 * IBM Corporation
42
43
 *
22
 *
44
45
 * This Original Code has been modified by IBM Corporation.
23
 * This Original Code has been modified by IBM Corporation.
46
47
 * Modifications made by IBM described herein are
24
 * Modifications made by IBM described herein are
48
49
 * Copyright (c) International Business Machines
25
 * Copyright (c) International Business Machines
50
51
 * Corporation, 1999
26
 * Corporation, 1999
52
53
 *
27
 *
54
55
 * Modifications to Mozilla code or documentation
28
 * Modifications to Mozilla code or documentation
56
57
 * identified per MPL Section 3.3
29
 * identified per MPL Section 3.3
58
59
 *
30
 *
60
61
 * Date         Modified by     Description of modification
31
 * Date         Modified by     Description of modification
62
63
 * 12/09/1999   IBM Corp.       Support for IBM codepages - 864i
32
 * 12/09/1999   IBM Corp.       Support for IBM codepages - 864i
64
65
 *
33
 *
66
67
 */
34
 */
68
35
69
70
71
#include "nsUnicodeToCP864i.h"
36
#include "nsUnicodeToCP864i.h"
72
37
73
74
75
//----------------------------------------------------------------------
38
//----------------------------------------------------------------------
76
77
// Global functions and data [declaration]
39
// Global functions and data [declaration]
78
static const PRUint16 g_ufMappingTable[] = {
40
static const PRUint16 g_ufMappingTable[] = {
79
#include "864i.uf"
41
#include "864i.uf"
 Lines 85-126    Link Here 
85
};
47
};
86
48
87
//----------------------------------------------------------------------
49
//----------------------------------------------------------------------
88
89
// Class nsUnicodeToCP864i [implementation]
50
// Class nsUnicodeToCP864i [implementation]
90
51
91
92
93
nsUnicodeToCP864i::nsUnicodeToCP864i() 
52
nsUnicodeToCP864i::nsUnicodeToCP864i() 
94
95
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
53
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
96
54
                        (uMappingTable*) &g_ufMappingTable, 1)
97
                        (uMappingTable*) &g_ufMappingTable)
98
99
{
55
{
100
101
}
56
}
102
57
103
104
105
106
107
//----------------------------------------------------------------------
108
109
// Subclassing of nsTableEncoderSupport class [implementation]
110
111
112
113
NS_IMETHODIMP nsUnicodeToCP864i::GetMaxLength(const PRUnichar * aSrc, 
114
115
                                              PRInt32 aSrcLength,
116
117
                                              PRInt32 * aDestLength)
118
119
{
120
121
  *aDestLength = aSrcLength;
122
123
  return NS_OK_UENC_EXACTLENGTH;
124
125
}
126
58
(-)intl/uconv/ucvibm/nsUnicodeToCP864i.h (-73 / +1 lines)
Line     Link Here 
 Lines 1-130    Link Here 
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2
3
 *
2
 *
4
5
 * The contents of this file are subject to the Netscape Public
3
 * The contents of this file are subject to the Netscape Public
6
7
 * License Version 1.1 (the "License"); you may not use this file
4
 * License Version 1.1 (the "License"); you may not use this file
8
9
 * except in compliance with the License. You may obtain a copy of
5
 * except in compliance with the License. You may obtain a copy of
10
11
 * the License at http://www.mozilla.org/NPL/
6
 * the License at http://www.mozilla.org/NPL/
12
13
 *
7
 *
14
15
 * Software distributed under the License is distributed on an "AS
8
 * Software distributed under the License is distributed on an "AS
16
17
 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9
 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
18
19
 * implied. See the License for the specific language governing
10
 * implied. See the License for the specific language governing
20
21
 * rights and limitations under the License.
11
 * rights and limitations under the License.
22
23
 *
12
 *
24
25
 * The Original Code is Mozilla Communicator client code.
13
 * The Original Code is Mozilla Communicator client code.
26
27
 *
14
 *
28
29
 * The Initial Developer of the Original Code is Netscape Communications
15
 * The Initial Developer of the Original Code is Netscape Communications
30
31
 * Corporation.  Portions created by Netscape are
16
 * Corporation.  Portions created by Netscape are
32
33
 * Copyright (C) 1998 Netscape Communications Corporation. All
17
 * Copyright (C) 1998 Netscape Communications Corporation. All
34
35
 * Rights Reserved.
18
 * Rights Reserved.
36
37
 *
19
 *
38
39
 * Contributor(s): 
20
 * Contributor(s): 
40
41
 * IBM Corporation
21
 * IBM Corporation
42
43
 *
22
 *
44
45
 * This Original Code has been modified by IBM Corporation.
23
 * This Original Code has been modified by IBM Corporation.
46
47
 * Modifications made by IBM described herein are
24
 * Modifications made by IBM described herein are
48
49
 * Copyright (c) International Business Machines
25
 * Copyright (c) International Business Machines
50
51
 * Corporation, 1999
26
 * Corporation, 1999
52
53
 *
27
 *
54
55
 * Modifications to Mozilla code or documentation
28
 * Modifications to Mozilla code or documentation
56
57
 * identified per MPL Section 3.3
29
 * identified per MPL Section 3.3
58
59
 *
30
 *
60
61
 * Date         Modified by     Description of modification
31
 * Date         Modified by     Description of modification
62
63
 * 12/09/1999   IBM Corp.       Support for IBM codepages - 864i
32
 * 12/09/1999   IBM Corp.       Support for IBM codepages - 864i
64
65
 *
33
 *
66
67
 */
34
 */
68
35
69
70
71
#ifndef nsUnicodeToCP864i_h___
36
#ifndef nsUnicodeToCP864i_h___
72
73
#define nsUnicodeToCP864i_h___
37
#define nsUnicodeToCP864i_h___
74
38
75
39
#include "nsUCSupport.h"
76
77
#include "nsUCvIBMSupport.h"
78
79
80
40
81
//----------------------------------------------------------------------
41
//----------------------------------------------------------------------
82
83
// Class nsUnicodeToCP864i [declaration]
42
// Class nsUnicodeToCP864i [declaration]
84
43
85
86
87
/**
44
/**
88
89
 * A character set converter from Unicode to CP864i.
45
 * A character set converter from Unicode to CP864i.
90
91
 */
46
 */
92
93
class nsUnicodeToCP864i : public nsTableEncoderSupport
47
class nsUnicodeToCP864i : public nsTableEncoderSupport
94
95
{
48
{
96
97
public:
49
public:
98
50
99
100
101
  /**
51
  /**
102
103
   * Class constructor.
52
   * Class constructor.
104
105
   */
53
   */
106
107
  nsUnicodeToCP864i();
54
  nsUnicodeToCP864i();
108
55
109
110
111
protected:
112
113
114
115
  //--------------------------------------------------------------------
116
117
  // Subclassing of nsEncoderSupport class [declaration]
118
119
120
121
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
122
123
      PRInt32 * aDestLength);
124
125
};
56
};
126
57
127
128
129
#endif /* nsUnicodeToCP864i_h___ */
58
#endif /* nsUnicodeToCP864i_h___ */
130
(-)intl/uconv/ucvja/Makefile.in (-5 / +9 lines)
Line     Link Here 
 Lines 27-35    Link Here 
27
include $(DEPTH)/config/autoconf.mk
27
include $(DEPTH)/config/autoconf.mk
28
28
29
MODULE		= ucvja
29
MODULE		= ucvja
30
LIBRARY_NAME	= ucvja
30
LIBRARY_NAME	= ucvja_s
31
EXPORT_LIBRARY = 1
31
#EXPORT_LIBRARY = 1
32
IS_COMPONENT	= 1
32
#IS_COMPONENT	= 1
33
FORCE_STATIC_LIB = 1
33
MODULE_NAME	= nsUCvJAModule
34
MODULE_NAME	= nsUCvJAModule
34
REQUIRES	= xpcom \
35
REQUIRES	= xpcom \
35
		  string \
36
		  string \
 Lines 41-48    Link Here 
41
		nsUnicodeToSJIS.cpp \
42
		nsUnicodeToSJIS.cpp \
42
		nsCP932ToUnicode.cpp \
43
		nsCP932ToUnicode.cpp \
43
		nsUnicodeToCP932.cpp \
44
		nsUnicodeToCP932.cpp \
44
		nsUCvJaSupport.cpp \
45
		nsUCvJaModule.cpp \
46
		nsUnicodeToEUCJP.cpp \
45
		nsUnicodeToEUCJP.cpp \
47
		nsUnicodeToISO2022JP.cpp \
46
		nsUnicodeToISO2022JP.cpp \
48
		nsUnicodeToJISx0201.cpp \
47
		nsUnicodeToJISx0201.cpp \
 Lines 54-59    Link Here 
54
		nsUCVJACID.h \
53
		nsUCVJACID.h \
55
		nsUCVJA2CID.h \
54
		nsUCVJA2CID.h \
56
		$(NULL)
55
		$(NULL)
56
57
#SHARED_LIBRARY_LIBS = $(DIST)/lib/$(LIB_PREFIX)ucvutil_s.$(LIB_SUFFIX)
58
59
LOCAL_INCLUDES	= -I$(srcdir)/../util
60
57
61
58
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS)
62
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS)
59
63
(-)intl/uconv/ucvja/nsJapaneseToUnicode.cpp (-1 / +1 lines)
Line     Link Here 
 Lines 37-43    Link Here 
37
 * ***** END LICENSE BLOCK ***** */
37
 * ***** END LICENSE BLOCK ***** */
38
#include "nsJapaneseToUnicode.h"
38
#include "nsJapaneseToUnicode.h"
39
39
40
#include "nsUCvJaSupport.h"
40
#include "nsUCSupport.h"
41
41
42
static const PRUint16 gJis0208map[] = {
42
static const PRUint16 gJis0208map[] = {
43
#include "jis0208.ump" 
43
#include "jis0208.ump" 
(-)intl/uconv/ucvja/nsJapaneseToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 38-44    Link Here 
38
#ifndef nsShiftJISToUnicode_h__
38
#ifndef nsShiftJISToUnicode_h__
39
#define nsShiftJISToUnicode_h__
39
#define nsShiftJISToUnicode_h__
40
#include "nsISupports.h"
40
#include "nsISupports.h"
41
#include "nsUCvJaSupport.h"
41
#include "nsUCSupport.h"
42
42
43
43
44
class nsShiftJISToUnicode : public nsBasicDecoderSupport
44
class nsShiftJISToUnicode : public nsBasicDecoderSupport
(-)intl/uconv/ucvja/nsUnicodeToEUCJP.cpp (-22 / +3 lines)
Line     Link Here 
 Lines 79-106    Link Here 
79
79
80
nsUnicodeToEUCJP::nsUnicodeToEUCJP() 
80
nsUnicodeToEUCJP::nsUnicodeToEUCJP() 
81
: nsMultiTableEncoderSupport(SIZE_OF_TABLES,
81
: nsMultiTableEncoderSupport(SIZE_OF_TABLES,
82
                         (uShiftTable**) gShiftTables, 
82
                             (uShiftTable**) gShiftTables, 
83
                         (uMappingTable**) gMappingTables)
83
                             (uMappingTable**) gMappingTables,
84
                             3 /* max length = src * 3 */)
84
{
85
{
85
}
86
}
86
87
87
nsresult nsUnicodeToEUCJP::CreateInstance(nsISupports ** aResult) 
88
{
89
  nsIUnicodeEncoder *p = new nsUnicodeToEUCJP();
90
  if(p) {
91
   *aResult = p;
92
   return NS_OK;
93
  }
94
  return NS_ERROR_OUT_OF_MEMORY;
95
}
96
97
//----------------------------------------------------------------------
98
// Subclassing of nsTableEncoderSupport class [implementation]
99
100
NS_IMETHODIMP nsUnicodeToEUCJP::GetMaxLength(const PRUnichar * aSrc, 
101
                                             PRInt32 aSrcLength,
102
                                             PRInt32 * aDestLength)
103
{
104
  *aDestLength = 3*aSrcLength;
105
  return NS_OK;
106
}
(-)intl/uconv/ucvja/nsUnicodeToEUCJP.h (-11 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToEUCJP_h___
39
#ifndef nsUnicodeToEUCJP_h___
40
#define nsUnicodeToEUCJP_h___
40
#define nsUnicodeToEUCJP_h___
41
41
42
#include "nsUCvJaSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToEUCJP [declaration]
45
// Class nsUnicodeToEUCJP [declaration]
 Lines 59-76    Link Here 
59
   */
59
   */
60
  nsUnicodeToEUCJP();
60
  nsUnicodeToEUCJP();
61
61
62
  /**
63
   * Static class constructor.
64
   */
65
  static nsresult CreateInstance(nsISupports **aResult);
66
67
protected:
62
protected:
68
63
69
  //--------------------------------------------------------------------
70
  // Subclassing of nsEncoderSupport class [declaration]
71
72
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
73
      PRInt32 * aDestLength);
74
};
64
};
75
65
76
#endif /* nsUnicodeToEUCJP_h___ */
66
#endif /* nsUnicodeToEUCJP_h___ */
(-)intl/uconv/ucvja/nsUnicodeToISO2022JP.cpp (-22 / +4 lines)
Line     Link Here 
 Lines 87-94    Link Here 
87
//----------------------------------------------------------------------
87
//----------------------------------------------------------------------
88
// Class nsUnicodeToISO2022JP [implementation]
88
// Class nsUnicodeToISO2022JP [implementation]
89
89
90
// worst case max length: 
91
//  1  2 3  4  5  6  7 8
92
// ESC $ B XX XX ESC ( B
90
nsUnicodeToISO2022JP::nsUnicodeToISO2022JP() 
93
nsUnicodeToISO2022JP::nsUnicodeToISO2022JP() 
91
: nsEncoderSupport()
94
: nsEncoderSupport(8)
92
{
95
{
93
  mHelper = NULL;
96
  mHelper = NULL;
94
  Reset();
97
  Reset();
 Lines 99-114    Link Here 
99
  NS_IF_RELEASE(mHelper);
102
  NS_IF_RELEASE(mHelper);
100
}
103
}
101
104
102
nsresult nsUnicodeToISO2022JP::CreateInstance(nsISupports ** aResult) 
103
{
104
  nsIUnicodeEncoder *p = new nsUnicodeToISO2022JP();
105
  if(p) {
106
   *aResult = p;
107
   return NS_OK;
108
  }
109
  return NS_ERROR_OUT_OF_MEMORY;
110
}
111
112
nsresult nsUnicodeToISO2022JP::ChangeCharset(PRInt32 aCharset,
105
nsresult nsUnicodeToISO2022JP::ChangeCharset(PRInt32 aCharset,
113
                                             char * aDest, 
106
                                             char * aDest, 
114
                                             PRInt32 * aDestLength)
107
                                             PRInt32 * aDestLength)
 Lines 246-262    Link Here 
246
                                                 PRInt32 * aDestLength)
239
                                                 PRInt32 * aDestLength)
247
{
240
{
248
  ChangeCharset(0, aDest, aDestLength);
241
  ChangeCharset(0, aDest, aDestLength);
249
  return NS_OK;
250
}
251
252
NS_IMETHODIMP nsUnicodeToISO2022JP::GetMaxLength(const PRUnichar * aSrc, 
253
                                                 PRInt32 aSrcLength,
254
                                                 PRInt32 * aDestLength)
255
{
256
  // worst case
257
  //  1  2 3  4  5  6  7 8
258
  // ESC $ B XX XX ESC ( B
259
  *aDestLength = 8*aSrcLength;
260
  return NS_OK;
242
  return NS_OK;
261
}
243
}
262
244
(-)intl/uconv/ucvja/nsUnicodeToISO2022JP.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToISO2022JP_h___
39
#ifndef nsUnicodeToISO2022JP_h___
40
#define nsUnicodeToISO2022JP_h___
40
#define nsUnicodeToISO2022JP_h___
41
41
42
#include "nsUCvJaSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToISO2022JP [declaration]
45
// Class nsUnicodeToISO2022JP [declaration]
 Lines 64-74    Link Here 
64
   */
64
   */
65
  virtual ~nsUnicodeToISO2022JP();
65
  virtual ~nsUnicodeToISO2022JP();
66
66
67
  /**
68
   * Static class constructor.
69
   */
70
  static nsresult CreateInstance(nsISupports **aResult);
71
72
protected:
67
protected:
73
68
74
  PRInt32                   mCharset;       // current character set
69
  PRInt32                   mCharset;       // current character set
 Lines 83-90    Link Here 
83
  NS_IMETHOD ConvertNoBuffNoErr(const PRUnichar * aSrc, PRInt32 * aSrcLength, 
78
  NS_IMETHOD ConvertNoBuffNoErr(const PRUnichar * aSrc, PRInt32 * aSrcLength, 
84
      char * aDest, PRInt32 * aDestLength);
79
      char * aDest, PRInt32 * aDestLength);
85
  NS_IMETHOD FinishNoBuff(char * aDest, PRInt32 * aDestLength);
80
  NS_IMETHOD FinishNoBuff(char * aDest, PRInt32 * aDestLength);
86
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
87
      PRInt32 * aDestLength);
88
  NS_IMETHOD Reset();
81
  NS_IMETHOD Reset();
89
  NS_IMETHOD FillInfo(PRUint32 *aInfo);
82
  NS_IMETHOD FillInfo(PRUint32 *aInfo);
90
};
83
};
(-)intl/uconv/ucvja/nsUnicodeToJISx0201.cpp (-21 / +1 lines)
Line     Link Here 
 Lines 50-76    Link Here 
50
50
51
nsUnicodeToJISx0201::nsUnicodeToJISx0201() 
51
nsUnicodeToJISx0201::nsUnicodeToJISx0201() 
52
: nsTableEncoderSupport((uShiftTable*)  g0201ShiftTable,
52
: nsTableEncoderSupport((uShiftTable*)  g0201ShiftTable,
53
                        (uMappingTable*) g_uf0201Mapping)
53
                        (uMappingTable*) g_uf0201Mapping, 1)
54
{
54
{
55
}
55
}
56
56
57
nsresult nsUnicodeToJISx0201::CreateInstance(nsISupports ** aResult) 
58
{
59
  nsIUnicodeEncoder *p = new nsUnicodeToJISx0201();
60
  if(p) {
61
   *aResult = p;
62
   return NS_OK;
63
  }
64
  return NS_ERROR_OUT_OF_MEMORY;
65
}
66
67
//----------------------------------------------------------------------
68
// Subclassing of nsTableEncoderSupport class [implementation]
69
70
NS_IMETHODIMP nsUnicodeToJISx0201::GetMaxLength(const PRUnichar * aSrc, 
71
                                             PRInt32 aSrcLength,
72
                                             PRInt32 * aDestLength)
73
{
74
  *aDestLength = aSrcLength;
75
  return NS_OK_UENC_EXACTLENGTH;
76
}
(-)intl/uconv/ucvja/nsUnicodeToJISx0201.h (-11 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToJISx0201_h___
39
#ifndef nsUnicodeToJISx0201_h___
40
#define nsUnicodeToJISx0201_h___
40
#define nsUnicodeToJISx0201_h___
41
41
42
#include "nsUCvJaSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToJISx0201 [declaration]
45
// Class nsUnicodeToJISx0201 [declaration]
 Lines 59-76    Link Here 
59
   */
59
   */
60
  nsUnicodeToJISx0201();
60
  nsUnicodeToJISx0201();
61
61
62
  /**
63
   * Static class constructor.
64
   */
65
  static nsresult CreateInstance(nsISupports **aResult);
66
67
protected:
62
protected:
68
63
69
  //--------------------------------------------------------------------
70
  // Subclassing of nsEncoderSupport class [declaration]
71
72
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
73
      PRInt32 * aDestLength);
74
};
64
};
75
65
76
#endif /* nsUnicodeToJISx0201_h___ */
66
#endif /* nsUnicodeToJISx0201_h___ */
(-)intl/uconv/ucvja/nsUnicodeToJISx0208.cpp (-21 / +2 lines)
Line     Link Here 
 Lines 51-77    Link Here 
51
51
52
nsUnicodeToJISx0208::nsUnicodeToJISx0208() 
52
nsUnicodeToJISx0208::nsUnicodeToJISx0208() 
53
: nsTableEncoderSupport( (uShiftTable*) g0208ShiftTable,
53
: nsTableEncoderSupport( (uShiftTable*) g0208ShiftTable,
54
                         (uMappingTable*) g_uf0208Mapping)
54
                         (uMappingTable*) g_uf0208Mapping,
55
                         2 /* max length = src * 2 */)
55
{
56
{
56
}
57
}
57
58
58
nsresult nsUnicodeToJISx0208::CreateInstance(nsISupports ** aResult) 
59
{
60
  nsIUnicodeEncoder *p = new nsUnicodeToJISx0208();
61
  if(p) {
62
   *aResult = p;
63
   return NS_OK;
64
  }
65
  return NS_ERROR_OUT_OF_MEMORY;
66
}
67
68
//----------------------------------------------------------------------
69
// Subclassing of nsTableEncoderSupport class [implementation]
70
71
NS_IMETHODIMP nsUnicodeToJISx0208::GetMaxLength(const PRUnichar * aSrc, 
72
                                             PRInt32 aSrcLength,
73
                                             PRInt32 * aDestLength)
74
{
75
  *aDestLength = 2*aSrcLength;
76
  return NS_OK_UENC_EXACTLENGTH;
77
}
(-)intl/uconv/ucvja/nsUnicodeToJISx0208.h (-11 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToJISx0208_h___
39
#ifndef nsUnicodeToJISx0208_h___
40
#define nsUnicodeToJISx0208_h___
40
#define nsUnicodeToJISx0208_h___
41
41
42
#include "nsUCvJaSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToJISx0208 [declaration]
45
// Class nsUnicodeToJISx0208 [declaration]
 Lines 59-76    Link Here 
59
   */
59
   */
60
  nsUnicodeToJISx0208();
60
  nsUnicodeToJISx0208();
61
61
62
  /**
63
   * Static class constructor.
64
   */
65
  static nsresult CreateInstance(nsISupports **aResult);
66
67
protected:
62
protected:
68
63
69
  //--------------------------------------------------------------------
70
  // Subclassing of nsEncoderSupport class [declaration]
71
72
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
73
      PRInt32 * aDestLength);
74
};
64
};
75
65
76
#endif /* nsUnicodeToJISx0208_h___ */
66
#endif /* nsUnicodeToJISx0208_h___ */
(-)intl/uconv/ucvja/nsUnicodeToJISx0212.cpp (-21 / +2 lines)
Line     Link Here 
 Lines 51-77    Link Here 
51
51
52
nsUnicodeToJISx0212::nsUnicodeToJISx0212() 
52
nsUnicodeToJISx0212::nsUnicodeToJISx0212() 
53
: nsTableEncoderSupport((uShiftTable*) g0212ShiftTable,
53
: nsTableEncoderSupport((uShiftTable*) g0212ShiftTable,
54
                        (uMappingTable*) g_uf0212Mapping)
54
                        (uMappingTable*) g_uf0212Mapping,
55
                        2 /* max len = src * 2 */)
55
{
56
{
56
}
57
}
57
58
58
nsresult nsUnicodeToJISx0212::CreateInstance(nsISupports ** aResult) 
59
{
60
  nsIUnicodeEncoder *p = new nsUnicodeToJISx0212();
61
  if(p) {
62
   *aResult = p;
63
   return NS_OK;
64
  }
65
  return NS_ERROR_OUT_OF_MEMORY;
66
}
67
68
//----------------------------------------------------------------------
69
// Subclassing of nsTableEncoderSupport class [implementation]
70
71
NS_IMETHODIMP nsUnicodeToJISx0212::GetMaxLength(const PRUnichar * aSrc, 
72
                                             PRInt32 aSrcLength,
73
                                             PRInt32 * aDestLength)
74
{
75
  *aDestLength = 2*aSrcLength;
76
  return NS_OK_UENC_EXACTLENGTH;
77
}
(-)intl/uconv/ucvja/nsUnicodeToJISx0212.h (-11 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToJISx0212_h___
39
#ifndef nsUnicodeToJISx0212_h___
40
#define nsUnicodeToJISx0212_h___
40
#define nsUnicodeToJISx0212_h___
41
41
42
#include "nsUCvJaSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToJISx0212 [declaration]
45
// Class nsUnicodeToJISx0212 [declaration]
 Lines 59-76    Link Here 
59
   */
59
   */
60
  nsUnicodeToJISx0212();
60
  nsUnicodeToJISx0212();
61
61
62
  /**
63
   * Static class constructor.
64
   */
65
  static nsresult CreateInstance(nsISupports **aResult);
66
67
protected:
62
protected:
68
63
69
  //--------------------------------------------------------------------
70
  // Subclassing of nsEncoderSupport class [declaration]
71
72
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
73
      PRInt32 * aDestLength);
74
};
64
};
75
65
76
#endif /* nsUnicodeToJISx0212_h___ */
66
#endif /* nsUnicodeToJISx0212_h___ */
(-)intl/uconv/ucvja/nsUnicodeToSJIS.cpp (-21 / +2 lines)
Line     Link Here 
 Lines 58-84    Link Here 
58
58
59
nsUnicodeToSJIS::nsUnicodeToSJIS() 
59
nsUnicodeToSJIS::nsUnicodeToSJIS() 
60
: nsTableEncoderSupport((uShiftTable*) &g_SJISShiftTable, 
60
: nsTableEncoderSupport((uShiftTable*) &g_SJISShiftTable, 
61
                        (uMappingTable*) &g_SJISMappingTable)
61
                        (uMappingTable*) &g_SJISMappingTable,
62
                        2 /* max length = src * 2 */)
62
{
63
{
63
}
64
}
64
65
65
nsresult nsUnicodeToSJIS::CreateInstance(nsISupports ** aResult) 
66
{
67
  nsIUnicodeEncoder *p = new nsUnicodeToSJIS();
68
  if(p) {
69
   *aResult = p;
70
   return NS_OK;
71
  }
72
  return NS_ERROR_OUT_OF_MEMORY;
73
}
74
75
//----------------------------------------------------------------------
76
// Subclassing of nsTableEncoderSupport class [implementation]
77
78
NS_IMETHODIMP nsUnicodeToSJIS::GetMaxLength(const PRUnichar * aSrc, 
79
                                            PRInt32 aSrcLength,
80
                                            PRInt32 * aDestLength)
81
{
82
  *aDestLength = 2*aSrcLength;
83
  return NS_OK;
84
}
(-)intl/uconv/ucvja/nsUnicodeToSJIS.h (-11 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToSJIS_h___
39
#ifndef nsUnicodeToSJIS_h___
40
#define nsUnicodeToSJIS_h___
40
#define nsUnicodeToSJIS_h___
41
41
42
#include "nsUCvJaSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToSJIS [declaration]
45
// Class nsUnicodeToSJIS [declaration]
 Lines 59-76    Link Here 
59
   */
59
   */
60
  nsUnicodeToSJIS();
60
  nsUnicodeToSJIS();
61
61
62
  /**
63
   * Static class constructor.
64
   */
65
  static nsresult CreateInstance(nsISupports **aResult);
66
67
protected:
62
protected:
68
63
69
  //--------------------------------------------------------------------
70
  // Subclassing of nsEncoderSupport class [declaration]
71
72
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
73
      PRInt32 * aDestLength);
74
};
64
};
75
65
76
#endif /* nsUnicodeToSJIS_h___ */
66
#endif /* nsUnicodeToSJIS_h___ */
(-)intl/uconv/ucvko/Makefile.in (-6 / +3 lines)
Line     Link Here 
 Lines 27-35    Link Here 
27
include $(DEPTH)/config/autoconf.mk
27
include $(DEPTH)/config/autoconf.mk
28
28
29
MODULE		= ucvko
29
MODULE		= ucvko
30
LIBRARY_NAME	= ucvko
30
LIBRARY_NAME	= ucvko_s
31
EXPORT_LIBRARY = 1
31
FORCE_STATIC_LIB=1
32
IS_COMPONENT	= 1
33
MODULE_NAME	= nsUCvKoModule
32
MODULE_NAME	= nsUCvKoModule
34
REQUIRES	= xpcom \
33
REQUIRES	= xpcom \
35
		  string \
34
		  string \
 Lines 48-60    Link Here 
48
		nsUnicodeToJohab.cpp \
47
		nsUnicodeToJohab.cpp \
49
		nsJohabToUnicode.cpp \
48
		nsJohabToUnicode.cpp \
50
		nsUnicodeToJohabNoAscii.cpp \
49
		nsUnicodeToJohabNoAscii.cpp \
51
		nsUCvKOSupport.cpp \
52
		nsUCvKoModule.cpp \
53
		$(NULL)
50
		$(NULL)
54
51
55
EXPORTS		= nsUCvKOCID.h
52
EXPORTS		= nsUCvKOCID.h
56
53
57
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS)
54
LOCAL_INCLUDES = -I$(srcdir)/../util
58
55
59
include $(topsrcdir)/config/rules.mk
56
include $(topsrcdir)/config/rules.mk
60
57
(-)intl/uconv/ucvko/nsCP949ToUnicode.cpp (-13 / +1 lines)
Line     Link Here 
 Lines 112-130    Link Here 
112
: nsMultiTableDecoderSupport(sizeof(g_CP949Ranges) / sizeof(g_CP949Ranges[0]),
112
: nsMultiTableDecoderSupport(sizeof(g_CP949Ranges) / sizeof(g_CP949Ranges[0]),
113
                        (uRange*) &g_CP949Ranges,
113
                        (uRange*) &g_CP949Ranges,
114
                        (uShiftTable**) &g_CP949ShiftTableSet, 
114
                        (uShiftTable**) &g_CP949ShiftTableSet, 
115
                        (uMappingTable**) &g_CP949MappingTableSet)
115
                        (uMappingTable**) &g_CP949MappingTableSet, 1)
116
{
116
{
117
}
118
119
//----------------------------------------------------------------------
120
// Subclassing of nsTablesDecoderSupport class [implementation]
121
122
NS_IMETHODIMP nsCP949ToUnicode::GetMaxLength(const char * aSrc, 
123
                                              PRInt32 aSrcLength, 
124
                                              PRInt32 * aDestLength)
125
{
126
  // we are a single byte to Unicode converter, so...
127
  *aDestLength = aSrcLength;
128
  return NS_OK_UDEC_EXACTLENGTH;
129
}
117
}
130
118
(-)intl/uconv/ucvko/nsCP949ToUnicode.h (-7 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsCP949ToUnicode_h___
39
#ifndef nsCP949ToUnicode_h___
40
#define nsCP949ToUnicode_h___
40
#define nsCP949ToUnicode_h___
41
41
42
#include "nsUCvKOSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsCP949ToUnicode [declaration]
45
// Class nsCP949ToUnicode [declaration]
 Lines 60-71    Link Here 
60
  nsCP949ToUnicode();
60
  nsCP949ToUnicode();
61
61
62
protected:
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsDecoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
63
};
70
64
71
#endif /* nsCP949ToUnicode_h___ */
65
#endif /* nsCP949ToUnicode_h___ */
(-)intl/uconv/ucvko/nsEUCKRToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsEUCKRToUnicode_h___
39
#ifndef nsEUCKRToUnicode_h___
40
#define nsEUCKRToUnicode_h___
40
#define nsEUCKRToUnicode_h___
41
41
42
#include "nsUCvKOSupport.h"
42
#include "nsUCSupport.h"
43
#include "nsCP949ToUnicode.h"
43
#include "nsCP949ToUnicode.h"
44
44
45
//----------------------------------------------------------------------
45
//----------------------------------------------------------------------
(-)intl/uconv/ucvko/nsISO2022KRToUnicode.cpp (-1 / +1 lines)
Line     Link Here 
 Lines 36-42    Link Here 
36
 *
36
 *
37
 * ***** END LICENSE BLOCK ***** */
37
 * ***** END LICENSE BLOCK ***** */
38
#include "nsISO2022KRToUnicode.h"
38
#include "nsISO2022KRToUnicode.h"
39
#include "nsUCvKOSupport.h"
39
#include "nsUCSupport.h"
40
#include "nsICharsetConverterManager.h"
40
#include "nsICharsetConverterManager.h"
41
#include "nsIServiceManager.h"
41
#include "nsIServiceManager.h"
42
42
(-)intl/uconv/ucvko/nsISO2022KRToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 38-44    Link Here 
38
#ifndef nsISO2022KRToUnicode_h__
38
#ifndef nsISO2022KRToUnicode_h__
39
#define nsISO2022KRToUnicode_h__
39
#define nsISO2022KRToUnicode_h__
40
#include "nsISupports.h"
40
#include "nsISupports.h"
41
#include "nsUCvKOSupport.h"
41
#include "nsUCSupport.h"
42
42
43
43
44
 
44
 
(-)intl/uconv/ucvko/nsJohabToUnicode.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 97-114    Link Here 
97
: nsMultiTableDecoderSupport(sizeof(g_JOHABRanges) / sizeof(g_JOHABRanges[0]),
97
: nsMultiTableDecoderSupport(sizeof(g_JOHABRanges) / sizeof(g_JOHABRanges[0]),
98
                        (uRange*) &g_JOHABRanges,
98
                        (uRange*) &g_JOHABRanges,
99
                        (uShiftTable**) &g_JOHABShiftTableSet, 
99
                        (uShiftTable**) &g_JOHABShiftTableSet, 
100
                        (uMappingTable**) &g_JOHABMappingTableSet)
100
                        (uMappingTable**) &g_JOHABMappingTableSet, 1)
101
{
101
{
102
}
102
}
103
103
104
//----------------------------------------------------------------------
105
// Subclassing of nsTablesDecoderSupport class [implementation]
106
107
NS_IMETHODIMP nsJohabToUnicode::GetMaxLength(const char * aSrc, 
108
                                              PRInt32 aSrcLength, 
109
                                              PRInt32 * aDestLength)
110
{
111
  // we are a single byte to Unicode converter, so...
112
  *aDestLength = aSrcLength;
113
  return NS_OK_UDEC_EXACTLENGTH;
114
}
(-)intl/uconv/ucvko/nsJohabToUnicode.h (-7 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsJohabToUnicode_h___
39
#ifndef nsJohabToUnicode_h___
40
#define nsJohabToUnicode_h___
40
#define nsJohabToUnicode_h___
41
41
42
#include "nsUCvKOSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsJohabToUnicode [declaration]
45
// Class nsJohabToUnicode [declaration]
 Lines 60-71    Link Here 
60
  nsJohabToUnicode();
60
  nsJohabToUnicode();
61
61
62
protected:
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsDecoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
63
};
70
64
71
#endif /* nsJohabToUnicode_h___ */
65
#endif /* nsJohabToUnicode_h___ */
(-)intl/uconv/ucvko/nsUnicodeToCP949.cpp (-11 / +2 lines)
Line     Link Here 
 Lines 83-99    Link Here 
83
nsUnicodeToCP949::nsUnicodeToCP949() 
83
nsUnicodeToCP949::nsUnicodeToCP949() 
84
: nsMultiTableEncoderSupport(3,
84
: nsMultiTableEncoderSupport(3,
85
                        (uShiftTable**) g_CP949ShiftTable, 
85
                        (uShiftTable**) g_CP949ShiftTable, 
86
                        (uMappingTable**) g_CP949MappingTable)
86
                        (uMappingTable**) g_CP949MappingTable,
87
                             2 /* max len = src * 2 */)
87
{
88
{
88
}
89
}
89
90
90
//----------------------------------------------------------------------
91
// Subclassing of nsTableEncoderSupport class [implementation]
92
93
NS_IMETHODIMP nsUnicodeToCP949::GetMaxLength(const PRUnichar * aSrc, 
94
                                              PRInt32 aSrcLength,
95
                                              PRInt32 * aDestLength)
96
{
97
  *aDestLength = aSrcLength * 2; 
98
  return NS_OK;
99
}
(-)intl/uconv/ucvko/nsUnicodeToCP949.h (-7 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToCP949_h___
39
#ifndef nsUnicodeToCP949_h___
40
#define nsUnicodeToCP949_h___
40
#define nsUnicodeToCP949_h___
41
41
42
#include "nsUCvKOSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToCP949 [declaration]
45
// Class nsUnicodeToCP949 [declaration]
 Lines 60-71    Link Here 
60
  nsUnicodeToCP949();
60
  nsUnicodeToCP949();
61
61
62
protected:
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
63
};
70
64
71
#endif /* nsUnicodeToCP949_h___ */
65
#endif /* nsUnicodeToCP949_h___ */
(-)intl/uconv/ucvko/nsUnicodeToEUCKR.cpp (-11 / +3 lines)
Line     Link Here 
 Lines 75-91    Link Here 
75
nsUnicodeToEUCKR::nsUnicodeToEUCKR() 
75
nsUnicodeToEUCKR::nsUnicodeToEUCKR() 
76
: nsMultiTableEncoderSupport(3,
76
: nsMultiTableEncoderSupport(3,
77
                        (uShiftTable**) g_EUCKRShiftTable, 
77
                        (uShiftTable**) g_EUCKRShiftTable, 
78
                        (uMappingTable**) g_EUCKRMappingTable)
78
                        (uMappingTable**) g_EUCKRMappingTable,
79
                             // change from 2 to 8 because of composed jamo
80
                             8 /* max length = src * 8 */)
79
{
81
{
80
}
82
}
81
83
82
//----------------------------------------------------------------------
83
// Subclassing of nsTableEncoderSupport class [implementation]
84
85
NS_IMETHODIMP nsUnicodeToEUCKR::GetMaxLength(const PRUnichar * aSrc, 
86
                                              PRInt32 aSrcLength,
87
                                              PRInt32 * aDestLength)
88
{
89
  *aDestLength = aSrcLength * 8; // change from 2 to 8 because of composed jamo
90
  return NS_OK;
91
}
(-)intl/uconv/ucvko/nsUnicodeToEUCKR.h (-7 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToEUCKR_h___
39
#ifndef nsUnicodeToEUCKR_h___
40
#define nsUnicodeToEUCKR_h___
40
#define nsUnicodeToEUCKR_h___
41
41
42
#include "nsUCvKOSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToEUCKR [declaration]
45
// Class nsUnicodeToEUCKR [declaration]
 Lines 60-71    Link Here 
60
  nsUnicodeToEUCKR();
60
  nsUnicodeToEUCKR();
61
61
62
protected:
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
63
};
70
64
71
#endif /* nsUnicodeToEUCKR_h___ */
65
#endif /* nsUnicodeToEUCKR_h___ */
(-)intl/uconv/ucvko/nsUnicodeToJohab.cpp (-8 / +2 lines)
Line     Link Here 
 Lines 81-93    Link Here 
81
nsUnicodeToJohab::nsUnicodeToJohab() 
81
nsUnicodeToJohab::nsUnicodeToJohab() 
82
: nsMultiTableEncoderSupport(sizeof(g_JohabShiftTable) / sizeof(g_JohabShiftTable[0]),
82
: nsMultiTableEncoderSupport(sizeof(g_JohabShiftTable) / sizeof(g_JohabShiftTable[0]),
83
                        (uShiftTable**) g_JohabShiftTable, 
83
                        (uShiftTable**) g_JohabShiftTable, 
84
                        (uMappingTable**) g_JohabMappingTable)
84
                        (uMappingTable**) g_JohabMappingTable,
85
                             2 /* max length = src * 2*/)
85
{
86
{
86
}
87
NS_IMETHODIMP nsUnicodeToJohab::GetMaxLength(const PRUnichar* aSrc,
88
                                             PRInt32 aSrcLength,
89
                                             PRInt32 * aDestLength)
90
{ 
91
  *aDestLength = 2 * aSrcLength;
92
  return NS_OK;
93
}
87
}
(-)intl/uconv/ucvko/nsUnicodeToJohab.h (-3 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToJohab_h___
39
#ifndef nsUnicodeToJohab_h___
40
#define nsUnicodeToJohab_h___
40
#define nsUnicodeToJohab_h___
41
41
42
#include "nsUCvKOSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToJohab [declaration]
45
// Class nsUnicodeToJohab [declaration]
 Lines 57-64    Link Here 
57
   */
57
   */
58
  nsUnicodeToJohab();
58
  nsUnicodeToJohab();
59
59
60
  NS_IMETHOD GetMaxLength( const PRUnichar* aSrc, PRInt32 aSrcLength, 
61
                           PRInt32* aDestLength);
62
};
60
};
63
61
64
#endif /* nsUnicodeToJohab_h___ */
62
#endif /* nsUnicodeToJohab_h___ */
(-)intl/uconv/ucvko/nsUnicodeToJohabNoAscii.cpp (-8 / +2 lines)
Line     Link Here 
 Lines 76-88    Link Here 
76
nsUnicodeToJohabNoAscii::nsUnicodeToJohabNoAscii() 
76
nsUnicodeToJohabNoAscii::nsUnicodeToJohabNoAscii() 
77
: nsMultiTableEncoderSupport(sizeof(g_JohabShiftTable) / sizeof(g_JohabShiftTable[0]),
77
: nsMultiTableEncoderSupport(sizeof(g_JohabShiftTable) / sizeof(g_JohabShiftTable[0]),
78
                        (uShiftTable**) g_JohabShiftTable, 
78
                        (uShiftTable**) g_JohabShiftTable, 
79
                        (uMappingTable**) g_JohabMappingTable)
79
                        (uMappingTable**) g_JohabMappingTable,
80
                             2 /* max length = src * 2 */)
80
{
81
{
81
}
82
NS_IMETHODIMP nsUnicodeToJohabNoAscii::GetMaxLength(const PRUnichar* aSrc,
83
                                             PRInt32 aSrcLength,
84
                                             PRInt32 * aDestLength)
85
{ 
86
  *aDestLength = 2 * aSrcLength;
87
  return NS_OK;
88
}
82
}
(-)intl/uconv/ucvko/nsUnicodeToJohabNoAscii.h (-3 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToJohabNoAscii_h___
39
#ifndef nsUnicodeToJohabNoAscii_h___
40
#define nsUnicodeToJohabNoAscii_h___
40
#define nsUnicodeToJohabNoAscii_h___
41
41
42
#include "nsUCvKOSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToJohabNoAscii [declaration]
45
// Class nsUnicodeToJohabNoAscii [declaration]
 Lines 57-64    Link Here 
57
   */
57
   */
58
  nsUnicodeToJohabNoAscii();
58
  nsUnicodeToJohabNoAscii();
59
59
60
  NS_IMETHOD GetMaxLength( const PRUnichar* aSrc, PRInt32 aSrcLength, 
61
                           PRInt32* aDestLength);
62
};
60
};
63
61
64
#endif /* nsUnicodeToJohabNoAscii_h___ */
62
#endif /* nsUnicodeToJohabNoAscii_h___ */
(-)intl/uconv/ucvko/nsUnicodeToKSC5601.cpp (-11 / +2 lines)
Line     Link Here 
 Lines 67-83    Link Here 
67
67
68
nsUnicodeToKSC5601::nsUnicodeToKSC5601() 
68
nsUnicodeToKSC5601::nsUnicodeToKSC5601() 
69
: nsMultiTableEncoderSupport(2, (uShiftTable**) g_ShiftTable, 
69
: nsMultiTableEncoderSupport(2, (uShiftTable**) g_ShiftTable, 
70
                        (uMappingTable**) g_MappingTable)
70
                        (uMappingTable**) g_MappingTable,
71
                             8 /* max length = src * 8 */)
71
{
72
{
72
}
73
}
73
74
74
//----------------------------------------------------------------------
75
// Subclassing of nsTableEncoderSupport class [implementation]
76
77
NS_IMETHODIMP nsUnicodeToKSC5601::GetMaxLength(const PRUnichar * aSrc, 
78
                                              PRInt32 aSrcLength,
79
                                              PRInt32 * aDestLength)
80
{
81
  *aDestLength = aSrcLength * 8;
82
  return NS_OK;
83
}
(-)intl/uconv/ucvko/nsUnicodeToKSC5601.h (-6 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToKSC5601_h___
39
#ifndef nsUnicodeToKSC5601_h___
40
#define nsUnicodeToKSC5601_h___
40
#define nsUnicodeToKSC5601_h___
41
41
42
#include "nsUCvKOSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToKSC5601 [declaration]
45
// Class nsUnicodeToKSC5601 [declaration]
 Lines 61-71    Link Here 
61
61
62
protected:
62
protected:
63
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
64
};
70
65
71
#endif /* nsUnicodeToKSC5601_h___ */
66
#endif /* nsUnicodeToKSC5601_h___ */
(-)intl/uconv/ucvko/nsUnicodeToX11Johab.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToX11Johab_h___
39
#ifndef nsUnicodeToX11Johab_h___
40
#define nsUnicodeToX11Johab_h___
40
#define nsUnicodeToX11Johab_h___
41
41
42
#include "nsUCvKOSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToX11Johab [declaration]
45
// Class nsUnicodeToX11Johab [declaration]
(-)intl/uconv/ucvlatin/Makefile.in (-6 / +3 lines)
Line     Link Here 
 Lines 27-35    Link Here 
27
include $(DEPTH)/config/autoconf.mk
27
include $(DEPTH)/config/autoconf.mk
28
28
29
MODULE		= ucvlatin
29
MODULE		= ucvlatin
30
LIBRARY_NAME	= ucvlatin
30
LIBRARY_NAME	= ucvlatin_s
31
EXPORT_LIBRARY = 1
31
FORCE_STATIC_LIB = 1
32
IS_COMPONENT	= 1
33
MODULE_NAME	= nsUCvLatinModule
32
MODULE_NAME	= nsUCvLatinModule
34
REQUIRES	= xpcom \
33
REQUIRES	= xpcom \
35
		  string \
34
		  string \
 Lines 161-173    Link Here 
161
		nsUnicodeToUserDefined.cpp \
160
		nsUnicodeToUserDefined.cpp \
162
		nsUnicodeToSymbol.cpp \
161
		nsUnicodeToSymbol.cpp \
163
		nsUnicodeToZapfDingbat.cpp \
162
		nsUnicodeToZapfDingbat.cpp \
164
		nsUCvLatinSupport.cpp \
165
		nsUCvLatinModule.cpp \
166
		$(NULL)
163
		$(NULL)
167
164
168
EXPORTS		= nsUCvLatinCID.h
165
EXPORTS		= nsUCvLatinCID.h
169
166
170
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS)
167
LOCAL_INCLUDES = -I$(srcdir)/../util
171
168
172
include $(topsrcdir)/config/rules.mk
169
include $(topsrcdir)/config/rules.mk
173
170
(-)intl/uconv/ucvlatin/nsARMSCII8ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsARMSCII8ToUnicode_h___
39
#ifndef nsARMSCII8ToUnicode_h___
40
#define nsARMSCII8ToUnicode_h___
40
#define nsARMSCII8ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsARMSCII8ToUnicode [declaration]
45
// Class nsARMSCII8ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsAsciiToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsAsciiToUnicode_h___
39
#ifndef nsAsciiToUnicode_h___
40
#define nsAsciiToUnicode_h___
40
#define nsAsciiToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsAsciiToUnicode [declaration]
45
// Class nsAsciiToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsCP1250ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsCP1250ToUnicode_h___
39
#ifndef nsCP1250ToUnicode_h___
40
#define nsCP1250ToUnicode_h___
40
#define nsCP1250ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsCP1250ToUnicode [declaration]
45
// Class nsCP1250ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsCP1251ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsCP1251ToUnicode_h___
39
#ifndef nsCP1251ToUnicode_h___
40
#define nsCP1251ToUnicode_h___
40
#define nsCP1251ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsCP1251ToUnicode [declaration]
45
// Class nsCP1251ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsCP1253ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsCP1253ToUnicode_h___
39
#ifndef nsCP1253ToUnicode_h___
40
#define nsCP1253ToUnicode_h___
40
#define nsCP1253ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsCP1253ToUnicode [declaration]
45
// Class nsCP1253ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsCP1254ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsCP1254ToUnicode_h___
39
#ifndef nsCP1254ToUnicode_h___
40
#define nsCP1254ToUnicode_h___
40
#define nsCP1254ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsCP1254ToUnicode [declaration]
45
// Class nsCP1254ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsCP1255ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsCP1255ToUnicode_h___
39
#ifndef nsCP1255ToUnicode_h___
40
#define nsCP1255ToUnicode_h___
40
#define nsCP1255ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsCP1255ToUnicode [declaration]
45
// Class nsCP1255ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsCP1256ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsCP1256ToUnicode_h___
39
#ifndef nsCP1256ToUnicode_h___
40
#define nsCP1256ToUnicode_h___
40
#define nsCP1256ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsCP1256ToUnicode [declaration]
45
// Class nsCP1256ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsCP1257ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsCP1257ToUnicode_h___
39
#ifndef nsCP1257ToUnicode_h___
40
#define nsCP1257ToUnicode_h___
40
#define nsCP1257ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsCP1257ToUnicode [declaration]
45
// Class nsCP1257ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsCP1258ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsCP1258ToUnicode_h___
39
#ifndef nsCP1258ToUnicode_h___
40
#define nsCP1258ToUnicode_h___
40
#define nsCP1258ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsCP1258ToUnicode [declaration]
45
// Class nsCP1258ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsCP866ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsCP866ToUnicode_h___
39
#ifndef nsCP866ToUnicode_h___
40
#define nsCP866ToUnicode_h___
40
#define nsCP866ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsCP866ToUnicode [declaration]
45
// Class nsCP866ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsCP874ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsCP874ToUnicode_h___
39
#ifndef nsCP874ToUnicode_h___
40
#define nsCP874ToUnicode_h___
40
#define nsCP874ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsCP874ToUnicode [declaration]
45
// Class nsCP874ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsGEOSTD8ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 23-29    Link Here 
23
#ifndef nsGEOSTD8ToUnicode_h___
23
#ifndef nsGEOSTD8ToUnicode_h___
24
#define nsGEOSTD8ToUnicode_h___
24
#define nsGEOSTD8ToUnicode_h___
25
25
26
#include "nsUCvLatinSupport.h"
26
#include "nsUCSupport.h"
27
27
28
//----------------------------------------------------------------------
28
//----------------------------------------------------------------------
29
// Class nsGEOSTD8ToUnicode [declaration]
29
// Class nsGEOSTD8ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsISO885910ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsISO885910ToUnicode_h___
39
#ifndef nsISO885910ToUnicode_h___
40
#define nsISO885910ToUnicode_h___
40
#define nsISO885910ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsISO885910ToUnicode [declaration]
45
// Class nsISO885910ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsISO885913ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsISO885913ToUnicode_h___
39
#ifndef nsISO885913ToUnicode_h___
40
#define nsISO885913ToUnicode_h___
40
#define nsISO885913ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsISO885913ToUnicode [declaration]
45
// Class nsISO885913ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsISO885914ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsISO885914ToUnicode_h___
39
#ifndef nsISO885914ToUnicode_h___
40
#define nsISO885914ToUnicode_h___
40
#define nsISO885914ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsISO885914ToUnicode [declaration]
45
// Class nsISO885914ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsISO885915ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsISO885915ToUnicode_h___
39
#ifndef nsISO885915ToUnicode_h___
40
#define nsISO885915ToUnicode_h___
40
#define nsISO885915ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsISO885915ToUnicode [declaration]
45
// Class nsISO885915ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsISO885916ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsISO885916ToUnicode_h___
39
#ifndef nsISO885916ToUnicode_h___
40
#define nsISO885916ToUnicode_h___
40
#define nsISO885916ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsISO885916ToUnicode [declaration]
45
// Class nsISO885916ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsISO88592ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsISO88592ToUnicode_h___
39
#ifndef nsISO88592ToUnicode_h___
40
#define nsISO88592ToUnicode_h___
40
#define nsISO88592ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsISO88592ToUnicode [declaration]
45
// Class nsISO88592ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsISO88593ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsISO88593ToUnicode_h___
39
#ifndef nsISO88593ToUnicode_h___
40
#define nsISO88593ToUnicode_h___
40
#define nsISO88593ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsISO88593ToUnicode [declaration]
45
// Class nsISO88593ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsISO88594ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsISO88594ToUnicode_h___
39
#ifndef nsISO88594ToUnicode_h___
40
#define nsISO88594ToUnicode_h___
40
#define nsISO88594ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsISO88594ToUnicode [declaration]
45
// Class nsISO88594ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsISO88595ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsISO88595ToUnicode_h___
39
#ifndef nsISO88595ToUnicode_h___
40
#define nsISO88595ToUnicode_h___
40
#define nsISO88595ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsISO88595ToUnicode [declaration]
45
// Class nsISO88595ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsISO88596EToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsISO88596EToUnicode_h___
39
#ifndef nsISO88596EToUnicode_h___
40
#define nsISO88596EToUnicode_h___
40
#define nsISO88596EToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsISO88596EToUnicode [declaration]
45
// Class nsISO88596EToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsISO88596IToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsISO88596IToUnicode_h___
39
#ifndef nsISO88596IToUnicode_h___
40
#define nsISO88596IToUnicode_h___
40
#define nsISO88596IToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsISO88596IToUnicode [declaration]
45
// Class nsISO88596IToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsISO88596ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsISO88596ToUnicode_h___
39
#ifndef nsISO88596ToUnicode_h___
40
#define nsISO88596ToUnicode_h___
40
#define nsISO88596ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsISO88596ToUnicode [declaration]
45
// Class nsISO88596ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsISO88597ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsISO88597ToUnicode_h___
39
#ifndef nsISO88597ToUnicode_h___
40
#define nsISO88597ToUnicode_h___
40
#define nsISO88597ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsISO88597ToUnicode [declaration]
45
// Class nsISO88597ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsISO88598EToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsISO88598EToUnicode_h___
39
#ifndef nsISO88598EToUnicode_h___
40
#define nsISO88598EToUnicode_h___
40
#define nsISO88598EToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsISO88598EToUnicode [declaration]
45
// Class nsISO88598EToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsISO88598IToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsISO88598IToUnicode_h___
39
#ifndef nsISO88598IToUnicode_h___
40
#define nsISO88598IToUnicode_h___
40
#define nsISO88598IToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsISO88598IToUnicode [declaration]
45
// Class nsISO88598IToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsISO88598ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsISO88598ToUnicode_h___
39
#ifndef nsISO88598ToUnicode_h___
40
#define nsISO88598ToUnicode_h___
40
#define nsISO88598ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsISO88598ToUnicode [declaration]
45
// Class nsISO88598ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsISO88599ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsISO88599ToUnicode_h___
39
#ifndef nsISO88599ToUnicode_h___
40
#define nsISO88599ToUnicode_h___
40
#define nsISO88599ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsISO88599ToUnicode [declaration]
45
// Class nsISO88599ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsISOIR111ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsISOIR111ToUnicode_h___
39
#ifndef nsISOIR111ToUnicode_h___
40
#define nsISOIR111ToUnicode_h___
40
#define nsISOIR111ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsISOIR111ToUnicode [declaration]
45
// Class nsISOIR111ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsKOI8RToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsKOI8RToUnicode_h___
39
#ifndef nsKOI8RToUnicode_h___
40
#define nsKOI8RToUnicode_h___
40
#define nsKOI8RToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsKOI8RToUnicode [declaration]
45
// Class nsKOI8RToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsKOI8UToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsKOI8UToUnicode_h___
39
#ifndef nsKOI8UToUnicode_h___
40
#define nsKOI8UToUnicode_h___
40
#define nsKOI8UToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsKOI8UToUnicode [declaration]
45
// Class nsKOI8UToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsMacArabicToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsMacArabicToUnicode_h___
39
#ifndef nsMacArabicToUnicode_h___
40
#define nsMacArabicToUnicode_h___
40
#define nsMacArabicToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsMacArabicToUnicode [declaration]
45
// Class nsMacArabicToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsMacCEToUnicode.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-72    Link Here 
55
55
56
nsMacCEToUnicode::nsMacCEToUnicode() 
56
nsMacCEToUnicode::nsMacCEToUnicode() 
57
: nsTableDecoderSupport((uShiftTable*) &g_MacCEShiftTable, 
57
: nsTableDecoderSupport((uShiftTable*) &g_MacCEShiftTable, 
58
                        (uMappingTable*) &g_MacCEMappingTable)
58
                        (uMappingTable*) &g_MacCEMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableDecoderSupport class [implementation]
64
65
NS_IMETHODIMP nsMacCEToUnicode::GetMaxLength(const char * aSrc, 
66
                                              PRInt32 aSrcLength, 
67
                                              PRInt32 * aDestLength)
68
{
69
  // we are a single byte to Unicode converter, so...
70
  *aDestLength = aSrcLength;
71
  return NS_OK_UDEC_EXACTLENGTH;
72
}
(-)intl/uconv/ucvlatin/nsMacCEToUnicode.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsMacCEToUnicode_h___
39
#ifndef nsMacCEToUnicode_h___
40
#define nsMacCEToUnicode_h___
40
#define nsMacCEToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsMacCEToUnicode [declaration]
45
// Class nsMacCEToUnicode [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsMacCEToUnicode();
60
  nsMacCEToUnicode();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsDecoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsMacCEToUnicode_h___ */
64
#endif /* nsMacCEToUnicode_h___ */
(-)intl/uconv/ucvlatin/nsMacCroatianToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsMacCroatianToUnicode_h___
39
#ifndef nsMacCroatianToUnicode_h___
40
#define nsMacCroatianToUnicode_h___
40
#define nsMacCroatianToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsMacCroatianToUnicode [declaration]
45
// Class nsMacCroatianToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsMacCyrillicToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsMacCyrillicToUnicode_h___
39
#ifndef nsMacCyrillicToUnicode_h___
40
#define nsMacCyrillicToUnicode_h___
40
#define nsMacCyrillicToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsMacCyrillicToUnicode [declaration]
45
// Class nsMacCyrillicToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsMacDevanagariToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsMacDevanagariToUnicode_h___
39
#ifndef nsMacDevanagariToUnicode_h___
40
#define nsMacDevanagariToUnicode_h___
40
#define nsMacDevanagariToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsMacDevanagariToUnicode [declaration]
45
// Class nsMacDevanagariToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsMacFarsiToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsMacFarsiToUnicode_h___
39
#ifndef nsMacFarsiToUnicode_h___
40
#define nsMacFarsiToUnicode_h___
40
#define nsMacFarsiToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsMacFarsiToUnicode [declaration]
45
// Class nsMacFarsiToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsMacGreekToUnicode.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-72    Link Here 
55
55
56
nsMacGreekToUnicode::nsMacGreekToUnicode() 
56
nsMacGreekToUnicode::nsMacGreekToUnicode() 
57
: nsTableDecoderSupport((uShiftTable*) &g_MacGreekShiftTable, 
57
: nsTableDecoderSupport((uShiftTable*) &g_MacGreekShiftTable, 
58
                        (uMappingTable*) &g_MacGreekMappingTable)
58
                        (uMappingTable*) &g_MacGreekMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableDecoderSupport class [implementation]
64
65
NS_IMETHODIMP nsMacGreekToUnicode::GetMaxLength(const char * aSrc, 
66
                                              PRInt32 aSrcLength, 
67
                                              PRInt32 * aDestLength)
68
{
69
  // we are a single byte to Unicode converter, so...
70
  *aDestLength = aSrcLength;
71
  return NS_OK_UDEC_EXACTLENGTH;
72
}
(-)intl/uconv/ucvlatin/nsMacGreekToUnicode.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsMacGreekToUnicode_h___
39
#ifndef nsMacGreekToUnicode_h___
40
#define nsMacGreekToUnicode_h___
40
#define nsMacGreekToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsMacGreekToUnicode [declaration]
45
// Class nsMacGreekToUnicode [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsMacGreekToUnicode();
60
  nsMacGreekToUnicode();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsDecoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsMacGreekToUnicode_h___ */
64
#endif /* nsMacGreekToUnicode_h___ */
(-)intl/uconv/ucvlatin/nsMacGujaratiToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsMacGujaratiToUnicode_h___
39
#ifndef nsMacGujaratiToUnicode_h___
40
#define nsMacGujaratiToUnicode_h___
40
#define nsMacGujaratiToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsMacGujaratiToUnicode [declaration]
45
// Class nsMacGujaratiToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsMacGurmukhiToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsMacGurmukhiToUnicode_h___
39
#ifndef nsMacGurmukhiToUnicode_h___
40
#define nsMacGurmukhiToUnicode_h___
40
#define nsMacGurmukhiToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsMacGurmukhiToUnicode [declaration]
45
// Class nsMacGurmukhiToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsMacHebrewToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsMacHebrewToUnicode_h___
39
#ifndef nsMacHebrewToUnicode_h___
40
#define nsMacHebrewToUnicode_h___
40
#define nsMacHebrewToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsMacHebrewToUnicode [declaration]
45
// Class nsMacHebrewToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsMacIcelandicToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsMacIcelandicToUnicode_h___
39
#ifndef nsMacIcelandicToUnicode_h___
40
#define nsMacIcelandicToUnicode_h___
40
#define nsMacIcelandicToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsMacIcelandicToUnicode [declaration]
45
// Class nsMacIcelandicToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsMacRomanianToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsMacRomanianToUnicode_h___
39
#ifndef nsMacRomanianToUnicode_h___
40
#define nsMacRomanianToUnicode_h___
40
#define nsMacRomanianToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsMacRomanianToUnicode [declaration]
45
// Class nsMacRomanianToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsMacTurkishToUnicode.cpp (-13 / +1 lines)
Line     Link Here 
 Lines 55-72    Link Here 
55
55
56
nsMacTurkishToUnicode::nsMacTurkishToUnicode() 
56
nsMacTurkishToUnicode::nsMacTurkishToUnicode() 
57
: nsTableDecoderSupport((uShiftTable*) &g_MacTurkishShiftTable, 
57
: nsTableDecoderSupport((uShiftTable*) &g_MacTurkishShiftTable, 
58
                        (uMappingTable*) &g_MacTurkishMappingTable)
58
                        (uMappingTable*) &g_MacTurkishMappingTable, 1)
59
{
59
{
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableDecoderSupport class [implementation]
64
65
NS_IMETHODIMP nsMacTurkishToUnicode::GetMaxLength(const char * aSrc, 
66
                                              PRInt32 aSrcLength, 
67
                                              PRInt32 * aDestLength)
68
{
69
  // we are a single byte to Unicode converter, so...
70
  *aDestLength = aSrcLength;
71
  return NS_OK_UDEC_EXACTLENGTH;
72
}
60
}
(-)intl/uconv/ucvlatin/nsMacTurkishToUnicode.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsMacTurkishToUnicode_h___
39
#ifndef nsMacTurkishToUnicode_h___
40
#define nsMacTurkishToUnicode_h___
40
#define nsMacTurkishToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsMacTurkishToUnicode [declaration]
45
// Class nsMacTurkishToUnicode [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsMacTurkishToUnicode();
60
  nsMacTurkishToUnicode();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsDecoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsMacTurkishToUnicode_h___ */
64
#endif /* nsMacTurkishToUnicode_h___ */
(-)intl/uconv/ucvlatin/nsMacUkrainianToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsMacUkrainianToUnicode_h___
39
#ifndef nsMacUkrainianToUnicode_h___
40
#define nsMacUkrainianToUnicode_h___
40
#define nsMacUkrainianToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsMacUkrainianToUnicode [declaration]
45
// Class nsMacUkrainianToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsT61ToUnicode.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 58-74    Link Here 
58
58
59
nsT61ToUnicode::nsT61ToUnicode() 
59
nsT61ToUnicode::nsT61ToUnicode() 
60
: nsTableDecoderSupport((uShiftTable*) &g_T61ShiftTable, 
60
: nsTableDecoderSupport((uShiftTable*) &g_T61ShiftTable, 
61
                        (uMappingTable*) &g_T61MappingTable)
61
                        (uMappingTable*) &g_T61MappingTable, 1)
62
{
62
{
63
}
63
}
64
64
65
//----------------------------------------------------------------------
66
// Subclassing of nsTableDecoderSupport class [implementation]
67
68
NS_IMETHODIMP nsT61ToUnicode::GetMaxLength(const char * aSrc, 
69
                                            PRInt32 aSrcLength, 
70
                                            PRInt32 * aDestLength)
71
{
72
  *aDestLength = aSrcLength;
73
  return NS_OK;
74
}
(-)intl/uconv/ucvlatin/nsT61ToUnicode.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsT61ToUnicode_h___
39
#ifndef nsT61ToUnicode_h___
40
#define nsT61ToUnicode_h___
40
#define nsT61ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsT61ToUnicode [declaration]
45
// Class nsT61ToUnicode [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsT61ToUnicode();
60
  nsT61ToUnicode();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsDecoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsT61ToUnicode_h___ */
64
#endif /* nsT61ToUnicode_h___ */
(-)intl/uconv/ucvlatin/nsTCVN5712ToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsTCVN5712ToUnicode_h___
39
#ifndef nsTCVN5712ToUnicode_h___
40
#define nsTCVN5712ToUnicode_h___
40
#define nsTCVN5712ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsTCVN5712ToUnicode [declaration]
45
// Class nsTCVN5712ToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsUCS2BEToUnicode.cpp (-39 / +11 lines)
Line     Link Here 
 Lines 39-44    Link Here 
39
#include "nsUCS2BEToUnicode.h"
39
#include "nsUCS2BEToUnicode.h"
40
#include "nsUCvLatinDll.h"
40
#include "nsUCvLatinDll.h"
41
#include <string.h>
41
#include <string.h>
42
#include "prtypes.h"
42
//----------------------------------------------------------------------
43
//----------------------------------------------------------------------
43
// Global functions and data [declaration]
44
// Global functions and data [declaration]
44
45
 Lines 56-71    Link Here 
56
57
57
nsUCS2BEToUnicode::nsUCS2BEToUnicode() 
58
nsUCS2BEToUnicode::nsUCS2BEToUnicode() 
58
: nsTableDecoderSupport((uShiftTable*) &g_UCS2BEShiftTable, 
59
: nsTableDecoderSupport((uShiftTable*) &g_UCS2BEShiftTable, 
59
                        (uMappingTable*) &g_UCS2BEMappingTable)
60
                        (uMappingTable*) &g_UCS2BEMappingTable, 0)
60
{
61
{
61
}
62
}
62
63
63
nsresult nsUCS2BEToUnicode::CreateInstance(nsISupports ** aResult) 
64
{
65
  *aResult = new nsUCS2BEToUnicode();
66
  return (*aResult == NULL)? NS_ERROR_OUT_OF_MEMORY : NS_OK;
67
}
68
69
//----------------------------------------------------------------------
64
//----------------------------------------------------------------------
70
// Subclassing of nsTableDecoderSupport class [implementation]
65
// Subclassing of nsTableDecoderSupport class [implementation]
71
66
 Lines 228-256    Link Here 
228
  return res;
223
  return res;
229
}
224
}
230
225
231
static char BOM[] = {(char)0xfe, (char)0xff};
232
#define IsBigEndian() (0xFEFF == *((PRUint16*)BOM))
233
nsresult NEW_UTF16BEToUnicode(nsISupports **aResult)
234
{
235
   if(IsBigEndian()) {
236
     *aResult = new nsUTF16SameEndianToUnicode();
237
   } else {
238
     *aResult = new nsUTF16DiffEndianToUnicode();
239
   }
240
   return (NULL == *aResult) ? NS_ERROR_OUT_OF_MEMORY : NS_OK;
241
}
242
nsresult NEW_UTF16LEToUnicode(nsISupports **aResult)
243
{
244
   if(IsBigEndian()) {
245
     *aResult = new nsUTF16DiffEndianToUnicode();
246
   } else {
247
     *aResult = new nsUTF16SameEndianToUnicode();
248
   }
249
   return (NULL == *aResult) ? NS_ERROR_OUT_OF_MEMORY : NS_OK;
250
}
251
252
//============== above code is obsolete ==============================
253
254
nsresult UTF16ConvertToUnicode(PRUint8& aState, PRUint8& aData, const char * aSrc, PRInt32 * aSrcLength, PRUnichar * aDest, PRInt32 * aDestLength)
226
nsresult UTF16ConvertToUnicode(PRUint8& aState, PRUint8& aData, const char * aSrc, PRInt32 * aSrcLength, PRUnichar * aDest, PRInt32 * aDestLength)
255
{
227
{
256
  const char* src = aSrc;
228
  const char* src = aSrc;
 Lines 321-327    Link Here 
321
NS_IMETHODIMP nsUTF16BEToUnicode::Convert(const char * aSrc, PRInt32 * aSrcLength,
293
NS_IMETHODIMP nsUTF16BEToUnicode::Convert(const char * aSrc, PRInt32 * aSrcLength,
322
      PRUnichar * aDest, PRInt32 * aDestLength)
294
      PRUnichar * aDest, PRInt32 * aDestLength)
323
{
295
{
324
  if (!IsBigEndian()) {    
296
#ifdef IS_LITTLE_ENDIAN
325
    // process nsUTF16DiffEndianToUnicode
297
    // process nsUTF16DiffEndianToUnicode
326
    if(2 == mState) // first time called
298
    if(2 == mState) // first time called
327
    {
299
    {
 Lines 336-346    Link Here 
336
      }  
308
      }  
337
      mState=0;
309
      mState=0;
338
    }
310
    }
339
  }
311
#endif
340
312
341
  nsresult res = UTF16ConvertToUnicode(mState, mData, aSrc, aSrcLength, aDest, aDestLength);
313
  nsresult res = UTF16ConvertToUnicode(mState, mData, aSrc, aSrcLength, aDest, aDestLength);
342
314
343
  if (!IsBigEndian()) {
315
#ifdef IS_LITTLE_ENDIAN
344
    // process nsUTF16DiffEndianToUnicode
316
    // process nsUTF16DiffEndianToUnicode
345
    PRInt32 i;
317
    PRInt32 i;
346
318
 Lines 353-359    Link Here 
353
       *(p+1) = *p;
325
       *(p+1) = *p;
354
       *(p)= tmp;
326
       *(p)= tmp;
355
    }
327
    }
356
  }
328
#endif
357
  return res;
329
  return res;
358
}
330
}
359
331
 Lines 374-380    Link Here 
374
NS_IMETHODIMP nsUTF16LEToUnicode::Convert(const char * aSrc, PRInt32 * aSrcLength,
346
NS_IMETHODIMP nsUTF16LEToUnicode::Convert(const char * aSrc, PRInt32 * aSrcLength,
375
      PRUnichar * aDest, PRInt32 * aDestLength)
347
      PRUnichar * aDest, PRInt32 * aDestLength)
376
{
348
{
377
  if (IsBigEndian()) {    
349
#ifdef IS_BIG_ENDIAN
378
    // process nsUTF16DiffEndianToUnicode
350
    // process nsUTF16DiffEndianToUnicode
379
    if(2 == mState) // first time called
351
    if(2 == mState) // first time called
380
    {
352
    {
 Lines 389-399    Link Here 
389
      }  
361
      }  
390
      mState=0;
362
      mState=0;
391
    }
363
    }
392
  }
364
#endif
393
365
    
394
  nsresult res = UTF16ConvertToUnicode(mState, mData, aSrc, aSrcLength, aDest, aDestLength);
366
  nsresult res = UTF16ConvertToUnicode(mState, mData, aSrc, aSrcLength, aDest, aDestLength);
395
367
396
  if (IsBigEndian()) {
368
#ifdef IS_BIG_ENDIAN
397
    // process nsUTF16DiffEndianToUnicode
369
    // process nsUTF16DiffEndianToUnicode
398
    PRInt32 i;
370
    PRInt32 i;
399
371
 Lines 406-412    Link Here 
406
       *(p+1) = *p;
378
       *(p+1) = *p;
407
       *(p)= tmp;
379
       *(p)= tmp;
408
    }
380
    }
409
  }
381
#endif
410
  return res;
382
  return res;
411
}
383
}
412
384
(-)intl/uconv/ucvlatin/nsUCS2BEToUnicode.h (-8 / +1 lines)
Line     Link Here 
 Lines 40-46    Link Here 
40
#define nsUCS2BEToUnicode_h___
40
#define nsUCS2BEToUnicode_h___
41
41
42
#include "nsISupports.h"
42
#include "nsISupports.h"
43
#include "nsUCvLatinSupport.h"
43
#include "nsUCSupport.h"
44
44
45
//----------------------------------------------------------------------
45
//----------------------------------------------------------------------
46
// Class nsUCS2BEToUnicode [declaration]
46
// Class nsUCS2BEToUnicode [declaration]
 Lines 60-70    Link Here 
60
   */
60
   */
61
  nsUCS2BEToUnicode();
61
  nsUCS2BEToUnicode();
62
62
63
  /**
64
   * Static class constructor.
65
   */
66
  static nsresult CreateInstance(nsISupports **aResult);
67
68
protected:
63
protected:
69
64
70
  //--------------------------------------------------------------------
65
  //--------------------------------------------------------------------
 Lines 73-80    Link Here 
73
  NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength, 
68
  NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength, 
74
      PRInt32 * aDestLength);
69
      PRInt32 * aDestLength);
75
};
70
};
76
nsresult NEW_UTF16BEToUnicode(nsISupports **Result);
77
nsresult NEW_UTF16LEToUnicode(nsISupports **Result);
78
71
79
//============== above code is obsolete ==============================
72
//============== above code is obsolete ==============================
80
73
(-)intl/uconv/ucvlatin/nsUCS2LEToUnicode.cpp (-7 / +1 lines)
Line     Link Here 
 Lines 55-68    Link Here 
55
55
56
nsUCS2LEToUnicode::nsUCS2LEToUnicode() 
56
nsUCS2LEToUnicode::nsUCS2LEToUnicode() 
57
: nsTableDecoderSupport((uShiftTable*) &g_UCS2LEShiftTable, 
57
: nsTableDecoderSupport((uShiftTable*) &g_UCS2LEShiftTable, 
58
                        (uMappingTable*) &g_UCS2LEMappingTable)
58
                        (uMappingTable*) &g_UCS2LEMappingTable, 0)
59
{
59
{
60
}
61
62
nsresult nsUCS2LEToUnicode::CreateInstance(nsISupports ** aResult) 
63
{
64
  *aResult = new nsUCS2LEToUnicode();
65
  return (*aResult == NULL)? NS_ERROR_OUT_OF_MEMORY : NS_OK;
66
}
60
}
67
61
68
//----------------------------------------------------------------------
62
//----------------------------------------------------------------------
(-)intl/uconv/ucvlatin/nsUCS2LEToUnicode.h (-6 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUCS2LEToUnicode_h___
39
#ifndef nsUCS2LEToUnicode_h___
40
#define nsUCS2LEToUnicode_h___
40
#define nsUCS2LEToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUCS2LEToUnicode [declaration]
45
// Class nsUCS2LEToUnicode [declaration]
 Lines 58-68    Link Here 
58
   * Class constructor.
58
   * Class constructor.
59
   */
59
   */
60
  nsUCS2LEToUnicode();
60
  nsUCS2LEToUnicode();
61
62
  /**
63
   * Static class constructor.
64
   */
65
  static nsresult CreateInstance(nsISupports **aResult);
66
61
67
protected:
62
protected:
68
63
(-)intl/uconv/ucvlatin/nsUCS4BEToUnicode.cpp (-7 / +1 lines)
Line     Link Here 
 Lines 55-68    Link Here 
55
55
56
nsUCS4BEToUnicode::nsUCS4BEToUnicode() 
56
nsUCS4BEToUnicode::nsUCS4BEToUnicode() 
57
: nsTableDecoderSupport((uShiftTable*) &g_UCS4BEShiftTable, 
57
: nsTableDecoderSupport((uShiftTable*) &g_UCS4BEShiftTable, 
58
                        (uMappingTable*) &g_UCS4BEMappingTable)
58
                        (uMappingTable*) &g_UCS4BEMappingTable, 0)
59
{
59
{
60
}
61
62
nsresult nsUCS4BEToUnicode::CreateInstance(nsISupports ** aResult) 
63
{
64
  *aResult = new nsUCS4BEToUnicode();
65
  return (*aResult == NULL)? NS_ERROR_OUT_OF_MEMORY : NS_OK;
66
}
60
}
67
61
68
//----------------------------------------------------------------------
62
//----------------------------------------------------------------------
(-)intl/uconv/ucvlatin/nsUCS4BEToUnicode.h (-6 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUCS4BEToUnicode_h___
39
#ifndef nsUCS4BEToUnicode_h___
40
#define nsUCS4BEToUnicode_h___
40
#define nsUCS4BEToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUCS4BEToUnicode [declaration]
45
// Class nsUCS4BEToUnicode [declaration]
 Lines 57-67    Link Here 
57
   * Class constructor.
57
   * Class constructor.
58
   */
58
   */
59
  nsUCS4BEToUnicode();
59
  nsUCS4BEToUnicode();
60
61
  /**
62
   * Static class constructor.
63
   */
64
  static nsresult CreateInstance(nsISupports **aResult);
65
60
66
protected:
61
protected:
67
62
(-)intl/uconv/ucvlatin/nsUCS4LEToUnicode.cpp (-7 / +1 lines)
Line     Link Here 
 Lines 55-68    Link Here 
55
55
56
nsUCS4LEToUnicode::nsUCS4LEToUnicode() 
56
nsUCS4LEToUnicode::nsUCS4LEToUnicode() 
57
: nsTableDecoderSupport((uShiftTable*) &g_UCS4LEShiftTable, 
57
: nsTableDecoderSupport((uShiftTable*) &g_UCS4LEShiftTable, 
58
                        (uMappingTable*) &g_UCS4LEMappingTable)
58
                        (uMappingTable*) &g_UCS4LEMappingTable, 0)
59
{
59
{
60
}
61
62
nsresult nsUCS4LEToUnicode::CreateInstance(nsISupports ** aResult) 
63
{
64
  *aResult = new nsUCS4LEToUnicode();
65
  return (*aResult == NULL)? NS_ERROR_OUT_OF_MEMORY : NS_OK;
66
}
60
}
67
61
68
//----------------------------------------------------------------------
62
//----------------------------------------------------------------------
(-)intl/uconv/ucvlatin/nsUCS4LEToUnicode.h (-6 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUCS4LEToUnicode_h___
39
#ifndef nsUCS4LEToUnicode_h___
40
#define nsUCS4LEToUnicode_h___
40
#define nsUCS4LEToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUCS4LEToUnicode [declaration]
45
// Class nsUCS4LEToUnicode [declaration]
 Lines 58-68    Link Here 
58
   * Class constructor.
58
   * Class constructor.
59
   */
59
   */
60
  nsUCS4LEToUnicode();
60
  nsUCS4LEToUnicode();
61
62
  /**
63
   * Static class constructor.
64
   */
65
  static nsresult CreateInstance(nsISupports **aResult);
66
61
67
protected:
62
protected:
68
63
(-)intl/uconv/ucvlatin/nsUEscapeToUnicode.cpp (-6 lines)
Line     Link Here 
 Lines 151-159    Link Here 
151
  return NS_OK;
151
  return NS_OK;
152
}
152
}
153
153
154
155
nsresult NEW_UEscapeToUnicode(nsISupports **aResult)
156
{
157
   *aResult = new nsUEscapeToUnicode();
158
   return (NULL == *aResult) ? NS_ERROR_OUT_OF_MEMORY : NS_OK;
159
}
(-)intl/uconv/ucvlatin/nsUEscapeToUnicode.h (-5 / +2 lines)
Line     Link Here 
 Lines 41-47    Link Here 
41
#include "nsISupports.h"
41
#include "nsISupports.h"
42
42
43
#include "nsUEscapeToUnicode.h"
43
#include "nsUEscapeToUnicode.h"
44
#include "nsUCvLatinSupport.h"
44
#include "nsUCSupport.h"
45
45
46
//----------------------------------------------------------------------
46
//----------------------------------------------------------------------
47
// Class nsUEscapeToUnicode [declaration]
47
// Class nsUEscapeToUnicode [declaration]
 Lines 53-59    Link Here 
53
  /**
53
  /**
54
   * Class constructor.
54
   * Class constructor.
55
   */
55
   */
56
  nsUEscapeToUnicode() { Reset();};
56
  nsUEscapeToUnicode() : nsBasicDecoderSupport() { Reset();};
57
57
58
  NS_IMETHOD Convert(const char * aSrc, PRInt32 * aSrcLength,
58
  NS_IMETHOD Convert(const char * aSrc, PRInt32 * aSrcLength,
59
      PRUnichar * aDest, PRInt32 * aDestLength); 
59
      PRUnichar * aDest, PRInt32 * aDestLength); 
 Lines 71-78    Link Here 
71
  PRUnichar mBuffer[2];
71
  PRUnichar mBuffer[2];
72
  PRUint32  mBufferLen;
72
  PRUint32  mBufferLen;
73
};
73
};
74
75
nsresult NEW_UEscapeToUnicode(nsISupports **Result);
76
77
74
78
#endif /* nsUEscapeToUnicode_h___ */
75
#endif /* nsUEscapeToUnicode_h___ */
(-)intl/uconv/ucvlatin/nsUTF7ToUnicode.cpp (-10 / +1 lines)
Line     Link Here 
 Lines 45-51    Link Here 
45
// Class nsBasicUTF7Decoder [implementation]
45
// Class nsBasicUTF7Decoder [implementation]
46
46
47
nsBasicUTF7Decoder::nsBasicUTF7Decoder(char aLastChar, char aEscChar) 
47
nsBasicUTF7Decoder::nsBasicUTF7Decoder(char aLastChar, char aEscChar) 
48
: nsBufferDecoderSupport()
48
: nsBufferDecoderSupport(1)
49
{
49
{
50
  mLastChar = aLastChar;
50
  mLastChar = aLastChar;
51
  mEscChar = aEscChar;
51
  mEscChar = aEscChar;
 Lines 244-258    Link Here 
244
  *aSrcLength = src - aSrc;
244
  *aSrcLength = src - aSrc;
245
  *aDestLength = dest - aDest;
245
  *aDestLength = dest - aDest;
246
  return res;
246
  return res;
247
}
248
249
NS_IMETHODIMP nsBasicUTF7Decoder::GetMaxLength(const char * aSrc, 
250
                                               PRInt32 aSrcLength, 
251
                                               PRInt32 * aDestLength)
252
{
253
  // worst case
254
  *aDestLength = aSrcLength;
255
  return NS_OK;
256
}
247
}
257
248
258
NS_IMETHODIMP nsBasicUTF7Decoder::Reset()
249
NS_IMETHODIMP nsBasicUTF7Decoder::Reset()
(-)intl/uconv/ucvlatin/nsUTF7ToUnicode.h (-3 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUTF7ToUnicode_h___
39
#ifndef nsUTF7ToUnicode_h___
40
#define nsUTF7ToUnicode_h___
40
#define nsUTF7ToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsBasicUTF7Decoder [declaration]
45
// Class nsBasicUTF7Decoder [declaration]
 Lines 79-86    Link Here 
79
79
80
  NS_IMETHOD ConvertNoBuff(const char * aSrc, PRInt32 * aSrcLength, 
80
  NS_IMETHOD ConvertNoBuff(const char * aSrc, PRInt32 * aSrcLength, 
81
      PRUnichar * aDest, PRInt32 * aDestLength);
81
      PRUnichar * aDest, PRInt32 * aDestLength);
82
  NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength, 
83
      PRInt32 * aDestLength);
84
  NS_IMETHOD Reset();
82
  NS_IMETHOD Reset();
85
};
83
};
86
84
(-)intl/uconv/ucvlatin/nsUnicodeToARMSCII8.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToARMSCII8::nsUnicodeToARMSCII8() 
56
nsUnicodeToARMSCII8::nsUnicodeToARMSCII8() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToARMSCII8::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToARMSCII8.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToARMSCII8_h___
39
#ifndef nsUnicodeToARMSCII8_h___
40
#define nsUnicodeToARMSCII8_h___
40
#define nsUnicodeToARMSCII8_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToARMSCII8 [declaration]
45
// Class nsUnicodeToARMSCII8 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToARMSCII8();
60
  nsUnicodeToARMSCII8();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToARMSCII8_h___ */
64
#endif /* nsUnicodeToARMSCII8_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToAscii.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-72    Link Here 
55
55
56
nsUnicodeToAscii::nsUnicodeToAscii() 
56
nsUnicodeToAscii::nsUnicodeToAscii() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToAscii::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
60
}
72
61
(-)intl/uconv/ucvlatin/nsUnicodeToAscii.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToAscii_h___
39
#ifndef nsUnicodeToAscii_h___
40
#define nsUnicodeToAscii_h___
40
#define nsUnicodeToAscii_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToAscii [declaration]
45
// Class nsUnicodeToAscii [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToAscii();
60
  nsUnicodeToAscii();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToAscii_h___ */
64
#endif /* nsUnicodeToAscii_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToCP1250.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToCP1250::nsUnicodeToCP1250() 
56
nsUnicodeToCP1250::nsUnicodeToCP1250() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToCP1250::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToCP1250.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToCP1250_h___
39
#ifndef nsUnicodeToCP1250_h___
40
#define nsUnicodeToCP1250_h___
40
#define nsUnicodeToCP1250_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToCP1250 [declaration]
45
// Class nsUnicodeToCP1250 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToCP1250();
60
  nsUnicodeToCP1250();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToCP1250_h___ */
64
#endif /* nsUnicodeToCP1250_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToCP1251.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToCP1251::nsUnicodeToCP1251() 
56
nsUnicodeToCP1251::nsUnicodeToCP1251() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToCP1251::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToCP1251.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToCP1251_h___
39
#ifndef nsUnicodeToCP1251_h___
40
#define nsUnicodeToCP1251_h___
40
#define nsUnicodeToCP1251_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToCP1251 [declaration]
45
// Class nsUnicodeToCP1251 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToCP1251();
60
  nsUnicodeToCP1251();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToCP1251_h___ */
64
#endif /* nsUnicodeToCP1251_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToCP1253.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToCP1253::nsUnicodeToCP1253() 
56
nsUnicodeToCP1253::nsUnicodeToCP1253() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToCP1253::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToCP1253.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToCP1253_h___
39
#ifndef nsUnicodeToCP1253_h___
40
#define nsUnicodeToCP1253_h___
40
#define nsUnicodeToCP1253_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToCP1253 [declaration]
45
// Class nsUnicodeToCP1253 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToCP1253();
60
  nsUnicodeToCP1253();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToCP1253_h___ */
64
#endif /* nsUnicodeToCP1253_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToCP1254.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToCP1254::nsUnicodeToCP1254() 
56
nsUnicodeToCP1254::nsUnicodeToCP1254() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToCP1254::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToCP1254.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToCP1254_h___
39
#ifndef nsUnicodeToCP1254_h___
40
#define nsUnicodeToCP1254_h___
40
#define nsUnicodeToCP1254_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToCP1254 [declaration]
45
// Class nsUnicodeToCP1254 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToCP1254();
60
  nsUnicodeToCP1254();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToCP1254_h___ */
64
#endif /* nsUnicodeToCP1254_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToCP1255.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToCP1255::nsUnicodeToCP1255() 
56
nsUnicodeToCP1255::nsUnicodeToCP1255() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToCP1255::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToCP1255.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToCP1255_h___
39
#ifndef nsUnicodeToCP1255_h___
40
#define nsUnicodeToCP1255_h___
40
#define nsUnicodeToCP1255_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToCP1255 [declaration]
45
// Class nsUnicodeToCP1255 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToCP1255();
60
  nsUnicodeToCP1255();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToCP1255_h___ */
64
#endif /* nsUnicodeToCP1255_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToCP1256.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-72    Link Here 
55
55
56
nsUnicodeToCP1256::nsUnicodeToCP1256() 
56
nsUnicodeToCP1256::nsUnicodeToCP1256() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
63
//----------------------------------------------------------------------
64
// Subclassing of nsTableEncoderSupport class [implementation]
65
66
NS_IMETHODIMP nsUnicodeToCP1256::GetMaxLength(const PRUnichar * aSrc, 
67
                                              PRInt32 aSrcLength,
68
                                              PRInt32 * aDestLength)
69
{
70
  *aDestLength = aSrcLength;
71
  return NS_OK_UENC_EXACTLENGTH;
72
}
(-)intl/uconv/ucvlatin/nsUnicodeToCP1256.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToCP1256_h___
39
#ifndef nsUnicodeToCP1256_h___
40
#define nsUnicodeToCP1256_h___
40
#define nsUnicodeToCP1256_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToCP1256 [declaration]
45
// Class nsUnicodeToCP1256 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToCP1256();
60
  nsUnicodeToCP1256();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToCP1256_h___ */
64
#endif /* nsUnicodeToCP1256_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToCP1257.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToCP1257::nsUnicodeToCP1257() 
56
nsUnicodeToCP1257::nsUnicodeToCP1257() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToCP1257::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToCP1257.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToCP1257_h___
39
#ifndef nsUnicodeToCP1257_h___
40
#define nsUnicodeToCP1257_h___
40
#define nsUnicodeToCP1257_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToCP1257 [declaration]
45
// Class nsUnicodeToCP1257 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToCP1257();
60
  nsUnicodeToCP1257();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToCP1257_h___ */
64
#endif /* nsUnicodeToCP1257_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToCP1258.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToCP1258::nsUnicodeToCP1258() 
56
nsUnicodeToCP1258::nsUnicodeToCP1258() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToCP1258::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToCP1258.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToCP1258_h___
39
#ifndef nsUnicodeToCP1258_h___
40
#define nsUnicodeToCP1258_h___
40
#define nsUnicodeToCP1258_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToCP1258 [declaration]
45
// Class nsUnicodeToCP1258 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToCP1258();
60
  nsUnicodeToCP1258();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToCP1258_h___ */
64
#endif /* nsUnicodeToCP1258_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToCP866.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToCP866::nsUnicodeToCP866() 
56
nsUnicodeToCP866::nsUnicodeToCP866() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToCP866::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToCP866.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToCP866_h___
39
#ifndef nsUnicodeToCP866_h___
40
#define nsUnicodeToCP866_h___
40
#define nsUnicodeToCP866_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToCP866 [declaration]
45
// Class nsUnicodeToCP866 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToCP866();
60
  nsUnicodeToCP866();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToCP866_h___ */
64
#endif /* nsUnicodeToCP866_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToCP874.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToCP874::nsUnicodeToCP874() 
56
nsUnicodeToCP874::nsUnicodeToCP874() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToCP874::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
60
}
(-)intl/uconv/ucvlatin/nsUnicodeToCP874.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToCP874_h___
39
#ifndef nsUnicodeToCP874_h___
40
#define nsUnicodeToCP874_h___
40
#define nsUnicodeToCP874_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToCP874 [declaration]
45
// Class nsUnicodeToCP874 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToCP874();
60
  nsUnicodeToCP874();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToCP874_h___ */
64
#endif /* nsUnicodeToCP874_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToGEOSTD8.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 39-55    Link Here 
39
39
40
nsUnicodeToGEOSTD8::nsUnicodeToGEOSTD8() 
40
nsUnicodeToGEOSTD8::nsUnicodeToGEOSTD8() 
41
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
41
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
42
                        (uMappingTable*) &g_ufMappingTable)
42
                        (uMappingTable*) &g_ufMappingTable, 1)
43
{
43
{
44
}
45
46
//----------------------------------------------------------------------
47
// Subclassing of nsTableEncoderSupport class [implementation]
48
49
NS_IMETHODIMP nsUnicodeToGEOSTD8::GetMaxLength(const PRUnichar * aSrc, 
50
                                              PRInt32 aSrcLength,
51
                                              PRInt32 * aDestLength)
52
{
53
  *aDestLength = aSrcLength;
54
  return NS_OK_UENC_EXACTLENGTH;
55
}
44
}
(-)intl/uconv/ucvlatin/nsUnicodeToGEOSTD8.h (-8 / +1 lines)
Line     Link Here 
 Lines 23-29    Link Here 
23
#ifndef nsUnicodeToGEOSTD8_h___
23
#ifndef nsUnicodeToGEOSTD8_h___
24
#define nsUnicodeToGEOSTD8_h___
24
#define nsUnicodeToGEOSTD8_h___
25
25
26
#include "nsUCvLatinSupport.h"
26
#include "nsUCSupport.h"
27
27
28
//----------------------------------------------------------------------
28
//----------------------------------------------------------------------
29
// Class nsUnicodeToGEOSTD8 [declaration]
29
// Class nsUnicodeToGEOSTD8 [declaration]
 Lines 41-53    Link Here 
41
   */
41
   */
42
  nsUnicodeToGEOSTD8();
42
  nsUnicodeToGEOSTD8();
43
43
44
protected:
45
46
  //--------------------------------------------------------------------
47
  // Subclassing of nsEncoderSupport class [declaration]
48
49
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
50
      PRInt32 * aDestLength);
51
};
44
};
52
45
53
#endif /* nsUnicodeToGEOSTD8_h___ */
46
#endif /* nsUnicodeToGEOSTD8_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToISO885910.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-72    Link Here 
55
55
56
nsUnicodeToISO885910::nsUnicodeToISO885910() 
56
nsUnicodeToISO885910::nsUnicodeToISO885910() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToISO885910::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
60
}
72
61
(-)intl/uconv/ucvlatin/nsUnicodeToISO885910.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToISO885910_h___
39
#ifndef nsUnicodeToISO885910_h___
40
#define nsUnicodeToISO885910_h___
40
#define nsUnicodeToISO885910_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToISO885910 [declaration]
45
// Class nsUnicodeToISO885910 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToISO885910();
60
  nsUnicodeToISO885910();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToISO885910_h___ */
64
#endif /* nsUnicodeToISO885910_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToISO885913.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToISO885913::nsUnicodeToISO885913() 
56
nsUnicodeToISO885913::nsUnicodeToISO885913() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToISO885913::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
60
}
(-)intl/uconv/ucvlatin/nsUnicodeToISO885913.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToISO885913_h___
39
#ifndef nsUnicodeToISO885913_h___
40
#define nsUnicodeToISO885913_h___
40
#define nsUnicodeToISO885913_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToISO885913 [declaration]
45
// Class nsUnicodeToISO885913 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToISO885913();
60
  nsUnicodeToISO885913();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToISO885913_h___ */
64
#endif /* nsUnicodeToISO885913_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToISO885914.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToISO885914::nsUnicodeToISO885914() 
56
nsUnicodeToISO885914::nsUnicodeToISO885914() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToISO885914::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToISO885914.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToISO885914_h___
39
#ifndef nsUnicodeToISO885914_h___
40
#define nsUnicodeToISO885914_h___
40
#define nsUnicodeToISO885914_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToISO885914 [declaration]
45
// Class nsUnicodeToISO885914 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToISO885914();
60
  nsUnicodeToISO885914();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToISO885914_h___ */
64
#endif /* nsUnicodeToISO885914_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToISO885915.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToISO885915::nsUnicodeToISO885915() 
56
nsUnicodeToISO885915::nsUnicodeToISO885915() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToISO885915::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToISO885915.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToISO885915_h___
39
#ifndef nsUnicodeToISO885915_h___
40
#define nsUnicodeToISO885915_h___
40
#define nsUnicodeToISO885915_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToISO885915 [declaration]
45
// Class nsUnicodeToISO885915 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToISO885915();
60
  nsUnicodeToISO885915();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToISO885915_h___ */
64
#endif /* nsUnicodeToISO885915_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToISO885916.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToISO885916::nsUnicodeToISO885916() 
56
nsUnicodeToISO885916::nsUnicodeToISO885916() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToISO885916::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToISO885916.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToISO885916_h___
39
#ifndef nsUnicodeToISO885916_h___
40
#define nsUnicodeToISO885916_h___
40
#define nsUnicodeToISO885916_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToISO885916 [declaration]
45
// Class nsUnicodeToISO885916 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToISO885916();
60
  nsUnicodeToISO885916();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToISO885916_h___ */
64
#endif /* nsUnicodeToISO885916_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToISO88592.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToISO88592::nsUnicodeToISO88592() 
56
nsUnicodeToISO88592::nsUnicodeToISO88592() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToISO88592::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
60
}
(-)intl/uconv/ucvlatin/nsUnicodeToISO88592.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToISO88592_h___
39
#ifndef nsUnicodeToISO88592_h___
40
#define nsUnicodeToISO88592_h___
40
#define nsUnicodeToISO88592_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToISO88592 [declaration]
45
// Class nsUnicodeToISO88592 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToISO88592();
60
  nsUnicodeToISO88592();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToISO88592_h___ */
64
#endif /* nsUnicodeToISO88592_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToISO88593.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToISO88593::nsUnicodeToISO88593() 
56
nsUnicodeToISO88593::nsUnicodeToISO88593() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToISO88593::GetMaxLength(const PRUnichar * aSrc, 
66
                                                PRInt32 aSrcLength,
67
                                                PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
60
}
(-)intl/uconv/ucvlatin/nsUnicodeToISO88593.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToISO88593_h___
39
#ifndef nsUnicodeToISO88593_h___
40
#define nsUnicodeToISO88593_h___
40
#define nsUnicodeToISO88593_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToISO88593 [declaration]
45
// Class nsUnicodeToISO88593 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToISO88593();
60
  nsUnicodeToISO88593();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToISO88593_h___ */
64
#endif /* nsUnicodeToISO88593_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToISO88594.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToISO88594::nsUnicodeToISO88594() 
56
nsUnicodeToISO88594::nsUnicodeToISO88594() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToISO88594::GetMaxLength(const PRUnichar * aSrc, 
66
                                                PRInt32 aSrcLength,
67
                                                PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToISO88594.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToISO88594_h___
39
#ifndef nsUnicodeToISO88594_h___
40
#define nsUnicodeToISO88594_h___
40
#define nsUnicodeToISO88594_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToISO88594 [declaration]
45
// Class nsUnicodeToISO88594 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToISO88594();
60
  nsUnicodeToISO88594();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToISO88594_h___ */
64
#endif /* nsUnicodeToISO88594_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToISO88595.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToISO88595::nsUnicodeToISO88595() 
56
nsUnicodeToISO88595::nsUnicodeToISO88595() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToISO88595::GetMaxLength(const PRUnichar * aSrc, 
66
                                                PRInt32 aSrcLength,
67
                                                PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToISO88595.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToISO88595_h___
39
#ifndef nsUnicodeToISO88595_h___
40
#define nsUnicodeToISO88595_h___
40
#define nsUnicodeToISO88595_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToISO88595 [declaration]
45
// Class nsUnicodeToISO88595 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToISO88595();
60
  nsUnicodeToISO88595();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToISO88595_h___ */
64
#endif /* nsUnicodeToISO88595_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToISO88596.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToISO88596::nsUnicodeToISO88596() 
56
nsUnicodeToISO88596::nsUnicodeToISO88596() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToISO88596::GetMaxLength(const PRUnichar * aSrc, 
66
                                                PRInt32 aSrcLength,
67
                                                PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
60
}
(-)intl/uconv/ucvlatin/nsUnicodeToISO88596.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToISO88596_h___
39
#ifndef nsUnicodeToISO88596_h___
40
#define nsUnicodeToISO88596_h___
40
#define nsUnicodeToISO88596_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToISO88596 [declaration]
45
// Class nsUnicodeToISO88596 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToISO88596();
60
  nsUnicodeToISO88596();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToISO88596_h___ */
64
#endif /* nsUnicodeToISO88596_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToISO88596E.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToISO88596E_h___
39
#ifndef nsUnicodeToISO88596E_h___
40
#define nsUnicodeToISO88596E_h___
40
#define nsUnicodeToISO88596E_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToISO88596E [declaration]
45
// Class nsUnicodeToISO88596E [declaration]
(-)intl/uconv/ucvlatin/nsUnicodeToISO88596I.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToISO88596I_h___
39
#ifndef nsUnicodeToISO88596I_h___
40
#define nsUnicodeToISO88596I_h___
40
#define nsUnicodeToISO88596I_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToISO88596I [declaration]
45
// Class nsUnicodeToISO88596I [declaration]
(-)intl/uconv/ucvlatin/nsUnicodeToISO88597.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToISO88597::nsUnicodeToISO88597() 
56
nsUnicodeToISO88597::nsUnicodeToISO88597() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToISO88597::GetMaxLength(const PRUnichar * aSrc, 
66
                                                PRInt32 aSrcLength,
67
                                                PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToISO88597.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToISO88597_h___
39
#ifndef nsUnicodeToISO88597_h___
40
#define nsUnicodeToISO88597_h___
40
#define nsUnicodeToISO88597_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToISO88597 [declaration]
45
// Class nsUnicodeToISO88597 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToISO88597();
60
  nsUnicodeToISO88597();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToISO88597_h___ */
64
#endif /* nsUnicodeToISO88597_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToISO88598.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToISO88598::nsUnicodeToISO88598() 
56
nsUnicodeToISO88598::nsUnicodeToISO88598() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToISO88598::GetMaxLength(const PRUnichar * aSrc, 
66
                                                PRInt32 aSrcLength,
67
                                                PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToISO88598.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToISO88598_h___
39
#ifndef nsUnicodeToISO88598_h___
40
#define nsUnicodeToISO88598_h___
40
#define nsUnicodeToISO88598_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToISO88598 [declaration]
45
// Class nsUnicodeToISO88598 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToISO88598();
60
  nsUnicodeToISO88598();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToISO88598_h___ */
64
#endif /* nsUnicodeToISO88598_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToISO88598E.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToISO88598E_h___
39
#ifndef nsUnicodeToISO88598E_h___
40
#define nsUnicodeToISO88598E_h___
40
#define nsUnicodeToISO88598E_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToISO88598E [declaration]
45
// Class nsUnicodeToISO88598E [declaration]
(-)intl/uconv/ucvlatin/nsUnicodeToISO88598I.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToISO88598I_h___
39
#ifndef nsUnicodeToISO88598I_h___
40
#define nsUnicodeToISO88598I_h___
40
#define nsUnicodeToISO88598I_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToISO88598I [declaration]
45
// Class nsUnicodeToISO88598I [declaration]
(-)intl/uconv/ucvlatin/nsUnicodeToISO88599.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToISO88599::nsUnicodeToISO88599() 
56
nsUnicodeToISO88599::nsUnicodeToISO88599() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToISO88599::GetMaxLength(const PRUnichar * aSrc, 
66
                                                PRInt32 aSrcLength,
67
                                                PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
60
}
(-)intl/uconv/ucvlatin/nsUnicodeToISO88599.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToISO88599_h___
39
#ifndef nsUnicodeToISO88599_h___
40
#define nsUnicodeToISO88599_h___
40
#define nsUnicodeToISO88599_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToISO88599 [declaration]
45
// Class nsUnicodeToISO88599 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToISO88599();
60
  nsUnicodeToISO88599();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToISO88599_h___ */
64
#endif /* nsUnicodeToISO88599_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToISOIR111.cpp (-13 / +1 lines)
Line     Link Here 
 Lines 55-72    Link Here 
55
55
56
nsUnicodeToISOIR111::nsUnicodeToISOIR111() 
56
nsUnicodeToISOIR111::nsUnicodeToISOIR111() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToISOIR111::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
72
(-)intl/uconv/ucvlatin/nsUnicodeToISOIR111.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToISOIR111_h___
39
#ifndef nsUnicodeToISOIR111_h___
40
#define nsUnicodeToISOIR111_h___
40
#define nsUnicodeToISOIR111_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToISOIR111 [declaration]
45
// Class nsUnicodeToISOIR111 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToISOIR111();
60
  nsUnicodeToISOIR111();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToISOIR111_h___ */
64
#endif /* nsUnicodeToISOIR111_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToKOI8R.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToKOI8R::nsUnicodeToKOI8R() 
56
nsUnicodeToKOI8R::nsUnicodeToKOI8R() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToKOI8R::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
60
}
(-)intl/uconv/ucvlatin/nsUnicodeToKOI8R.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToKOI8R_h___
39
#ifndef nsUnicodeToKOI8R_h___
40
#define nsUnicodeToKOI8R_h___
40
#define nsUnicodeToKOI8R_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToKOI8R [declaration]
45
// Class nsUnicodeToKOI8R [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToKOI8R();
60
  nsUnicodeToKOI8R();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToKOI8R_h___ */
64
#endif /* nsUnicodeToKOI8R_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToKOI8U.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToKOI8U::nsUnicodeToKOI8U() 
56
nsUnicodeToKOI8U::nsUnicodeToKOI8U() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToKOI8U::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToKOI8U.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToKOI8U_h___
39
#ifndef nsUnicodeToKOI8U_h___
40
#define nsUnicodeToKOI8U_h___
40
#define nsUnicodeToKOI8U_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToKOI8U [declaration]
45
// Class nsUnicodeToKOI8U [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToKOI8U();
60
  nsUnicodeToKOI8U();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToKOI8U_h___ */
64
#endif /* nsUnicodeToKOI8U_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToLangBoxArabic8.cpp (-14 / +2 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
39
40
#include "nsUnicodeToLangBoxArabic8.h"
40
#include "nsUnicodeToLangBoxArabic8.h"
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToLangBoxArabic8 [declaration]
45
// Class nsUnicodeToLangBoxArabic8 [declaration]
 Lines 52-58    Link Here 
52
  /**
52
  /**
53
   * Class constructor.
53
   * Class constructor.
54
   */
54
   */
55
  nsUnicodeToLangBoxArabic8() {};
55
  nsUnicodeToLangBoxArabic8() : nsBasicEncoder(1) {};
56
  virtual ~nsUnicodeToLangBoxArabic8() {};
56
  virtual ~nsUnicodeToLangBoxArabic8() {};
57
57
58
  NS_IMETHOD Convert(
58
  NS_IMETHOD Convert(
 Lines 62-71    Link Here 
62
  NS_IMETHOD Finish(
62
  NS_IMETHOD Finish(
63
      char * aDest, PRInt32 * aDestLength);
63
      char * aDest, PRInt32 * aDestLength);
64
64
65
  NS_IMETHOD GetMaxLength(
66
      const PRUnichar * aSrc, PRInt32 aSrcLength,
67
      PRInt32 * aDestLength);
68
69
  NS_IMETHOD Reset();
65
  NS_IMETHOD Reset();
70
66
71
  NS_IMETHOD SetOutputErrorBehavior(
67
  NS_IMETHOD SetOutputErrorBehavior(
 Lines 148-161    Link Here 
148
      char * aDest, PRInt32 * aDestLength)
144
      char * aDest, PRInt32 * aDestLength)
149
{
145
{
150
   *aDestLength=0;
146
   *aDestLength=0;
151
   return NS_OK;
152
}
153
154
NS_IMETHODIMP nsUnicodeToLangBoxArabic8::GetMaxLength(
155
      const PRUnichar * aSrc, PRInt32 aSrcLength,
156
      PRInt32 * aDestLength)
157
{
158
   *aDestLength = aSrcLength;
159
   return NS_OK;
147
   return NS_OK;
160
}
148
}
161
149
(-)intl/uconv/ucvlatin/nsUnicodeToMacArabic.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToMacArabic::nsUnicodeToMacArabic() 
56
nsUnicodeToMacArabic::nsUnicodeToMacArabic() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToMacArabic::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
60
}
(-)intl/uconv/ucvlatin/nsUnicodeToMacArabic.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToMacArabic_h___
39
#ifndef nsUnicodeToMacArabic_h___
40
#define nsUnicodeToMacArabic_h___
40
#define nsUnicodeToMacArabic_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToMacArabic [declaration]
45
// Class nsUnicodeToMacArabic [declaration]
 Lines 56-68    Link Here 
56
   */
56
   */
57
  nsUnicodeToMacArabic();
57
  nsUnicodeToMacArabic();
58
58
59
protected:
60
61
  //--------------------------------------------------------------------
62
  // Subclassing of nsEncoderSupport class [declaration]
63
64
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
65
      PRInt32 * aDestLength);
66
};
59
};
67
60
68
#endif /* nsUnicodeToMacArabic_h___ */
61
#endif /* nsUnicodeToMacArabic_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToMacCE.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToMacCE::nsUnicodeToMacCE() 
56
nsUnicodeToMacCE::nsUnicodeToMacCE() 
57
: nsTableEncoderSupport((uShiftTable*) &g_MacCEShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_MacCEShiftTable, 
58
                        (uMappingTable*) &g_MacCEMappingTable)
58
                        (uMappingTable*) &g_MacCEMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToMacCE::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToMacCE.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToMacCE_h___
39
#ifndef nsUnicodeToMacCE_h___
40
#define nsUnicodeToMacCE_h___
40
#define nsUnicodeToMacCE_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToMacCE [declaration]
45
// Class nsUnicodeToMacCE [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToMacCE();
60
  nsUnicodeToMacCE();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToMacCE_h___ */
64
#endif /* nsUnicodeToMacCE_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToMacCroatian.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToMacCroatian::nsUnicodeToMacCroatian() 
56
nsUnicodeToMacCroatian::nsUnicodeToMacCroatian() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToMacCroatian::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToMacCroatian.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToMacCroatian_h___
39
#ifndef nsUnicodeToMacCroatian_h___
40
#define nsUnicodeToMacCroatian_h___
40
#define nsUnicodeToMacCroatian_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToMacCroatian [declaration]
45
// Class nsUnicodeToMacCroatian [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToMacCroatian();
60
  nsUnicodeToMacCroatian();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToMacCroatian_h___ */
64
#endif /* nsUnicodeToMacCroatian_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToMacCyrillic.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToMacCyrillic::nsUnicodeToMacCyrillic() 
56
nsUnicodeToMacCyrillic::nsUnicodeToMacCyrillic() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToMacCyrillic::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
60
}
(-)intl/uconv/ucvlatin/nsUnicodeToMacCyrillic.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToMacCyrillic_h___
39
#ifndef nsUnicodeToMacCyrillic_h___
40
#define nsUnicodeToMacCyrillic_h___
40
#define nsUnicodeToMacCyrillic_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToMacCyrillic [declaration]
45
// Class nsUnicodeToMacCyrillic [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToMacCyrillic();
60
  nsUnicodeToMacCyrillic();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToMacCyrillic_h___ */
64
#endif /* nsUnicodeToMacCyrillic_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToMacDevanagari.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToMacDevanagari::nsUnicodeToMacDevanagari() 
56
nsUnicodeToMacDevanagari::nsUnicodeToMacDevanagari() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToMacDevanagari::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
60
}
(-)intl/uconv/ucvlatin/nsUnicodeToMacDevanagari.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToMacDevanagari_h___
39
#ifndef nsUnicodeToMacDevanagari_h___
40
#define nsUnicodeToMacDevanagari_h___
40
#define nsUnicodeToMacDevanagari_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToMacDevanagari [declaration]
45
// Class nsUnicodeToMacDevanagari [declaration]
 Lines 56-68    Link Here 
56
   */
56
   */
57
  nsUnicodeToMacDevanagari();
57
  nsUnicodeToMacDevanagari();
58
58
59
protected:
60
61
  //--------------------------------------------------------------------
62
  // Subclassing of nsEncoderSupport class [declaration]
63
64
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
65
      PRInt32 * aDestLength);
66
};
59
};
67
60
68
#endif /* nsUnicodeToMacDevanagari_h___ */
61
#endif /* nsUnicodeToMacDevanagari_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToMacFarsi.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToMacFarsi::nsUnicodeToMacFarsi() 
56
nsUnicodeToMacFarsi::nsUnicodeToMacFarsi() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToMacFarsi::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
60
}
(-)intl/uconv/ucvlatin/nsUnicodeToMacFarsi.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToMacFarsi_h___
39
#ifndef nsUnicodeToMacFarsi_h___
40
#define nsUnicodeToMacFarsi_h___
40
#define nsUnicodeToMacFarsi_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToMacFarsi [declaration]
45
// Class nsUnicodeToMacFarsi [declaration]
 Lines 56-68    Link Here 
56
   */
56
   */
57
  nsUnicodeToMacFarsi();
57
  nsUnicodeToMacFarsi();
58
58
59
protected:
60
61
  //--------------------------------------------------------------------
62
  // Subclassing of nsEncoderSupport class [declaration]
63
64
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
65
      PRInt32 * aDestLength);
66
};
59
};
67
60
68
#endif /* nsUnicodeToMacFarsi_h___ */
61
#endif /* nsUnicodeToMacFarsi_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToMacGreek.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToMacGreek::nsUnicodeToMacGreek() 
56
nsUnicodeToMacGreek::nsUnicodeToMacGreek() 
57
: nsTableEncoderSupport((uShiftTable*) &g_MacGreekShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_MacGreekShiftTable, 
58
                        (uMappingTable*) &g_MacGreekMappingTable)
58
                        (uMappingTable*) &g_MacGreekMappingTable, 1)
59
{
59
{
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToMacGreek::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
60
}
(-)intl/uconv/ucvlatin/nsUnicodeToMacGreek.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToMacGreek_h___
39
#ifndef nsUnicodeToMacGreek_h___
40
#define nsUnicodeToMacGreek_h___
40
#define nsUnicodeToMacGreek_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToMacGreek [declaration]
45
// Class nsUnicodeToMacGreek [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToMacGreek();
60
  nsUnicodeToMacGreek();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToMacGreek_h___ */
64
#endif /* nsUnicodeToMacGreek_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToMacGujarati.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToMacGujarati::nsUnicodeToMacGujarati() 
56
nsUnicodeToMacGujarati::nsUnicodeToMacGujarati() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToMacGujarati::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
60
}
(-)intl/uconv/ucvlatin/nsUnicodeToMacGujarati.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToMacGujarati_h___
39
#ifndef nsUnicodeToMacGujarati_h___
40
#define nsUnicodeToMacGujarati_h___
40
#define nsUnicodeToMacGujarati_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToMacGujarati [declaration]
45
// Class nsUnicodeToMacGujarati [declaration]
 Lines 56-68    Link Here 
56
   */
56
   */
57
  nsUnicodeToMacGujarati();
57
  nsUnicodeToMacGujarati();
58
58
59
protected:
60
61
  //--------------------------------------------------------------------
62
  // Subclassing of nsEncoderSupport class [declaration]
63
64
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
65
      PRInt32 * aDestLength);
66
};
59
};
67
60
68
#endif /* nsUnicodeToMacGujarati_h___ */
61
#endif /* nsUnicodeToMacGujarati_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToMacGurmukhi.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToMacGurmukhi::nsUnicodeToMacGurmukhi() 
56
nsUnicodeToMacGurmukhi::nsUnicodeToMacGurmukhi() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToMacGurmukhi::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToMacGurmukhi.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToMacGurmukhi_h___
39
#ifndef nsUnicodeToMacGurmukhi_h___
40
#define nsUnicodeToMacGurmukhi_h___
40
#define nsUnicodeToMacGurmukhi_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToMacGurmukhi [declaration]
45
// Class nsUnicodeToMacGurmukhi [declaration]
 Lines 56-68    Link Here 
56
   */
56
   */
57
  nsUnicodeToMacGurmukhi();
57
  nsUnicodeToMacGurmukhi();
58
58
59
protected:
60
61
  //--------------------------------------------------------------------
62
  // Subclassing of nsEncoderSupport class [declaration]
63
64
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
65
      PRInt32 * aDestLength);
66
};
59
};
67
60
68
#endif /* nsUnicodeToMacGurmukhi_h___ */
61
#endif /* nsUnicodeToMacGurmukhi_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToMacHebrew.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToMacHebrew::nsUnicodeToMacHebrew() 
56
nsUnicodeToMacHebrew::nsUnicodeToMacHebrew() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToMacHebrew::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
60
}
(-)intl/uconv/ucvlatin/nsUnicodeToMacHebrew.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToMacHebrew_h___
39
#ifndef nsUnicodeToMacHebrew_h___
40
#define nsUnicodeToMacHebrew_h___
40
#define nsUnicodeToMacHebrew_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToMacHebrew [declaration]
45
// Class nsUnicodeToMacHebrew [declaration]
 Lines 56-68    Link Here 
56
   */
56
   */
57
  nsUnicodeToMacHebrew();
57
  nsUnicodeToMacHebrew();
58
58
59
protected:
60
61
  //--------------------------------------------------------------------
62
  // Subclassing of nsEncoderSupport class [declaration]
63
64
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
65
      PRInt32 * aDestLength);
66
};
59
};
67
60
68
#endif /* nsUnicodeToMacHebrew_h___ */
61
#endif /* nsUnicodeToMacHebrew_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToMacIcelandic.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToMacIcelandic::nsUnicodeToMacIcelandic() 
56
nsUnicodeToMacIcelandic::nsUnicodeToMacIcelandic() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToMacIcelandic::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToMacIcelandic.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToMacIcelandic_h___
39
#ifndef nsUnicodeToMacIcelandic_h___
40
#define nsUnicodeToMacIcelandic_h___
40
#define nsUnicodeToMacIcelandic_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToMacIcelandic [declaration]
45
// Class nsUnicodeToMacIcelandic [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToMacIcelandic();
60
  nsUnicodeToMacIcelandic();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToMacIcelandic_h___ */
64
#endif /* nsUnicodeToMacIcelandic_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToMacRomanian.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToMacRomanian::nsUnicodeToMacRomanian() 
56
nsUnicodeToMacRomanian::nsUnicodeToMacRomanian() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToMacRomanian::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
60
}
(-)intl/uconv/ucvlatin/nsUnicodeToMacRomanian.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToMacRomanian_h___
39
#ifndef nsUnicodeToMacRomanian_h___
40
#define nsUnicodeToMacRomanian_h___
40
#define nsUnicodeToMacRomanian_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToMacRomanian [declaration]
45
// Class nsUnicodeToMacRomanian [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToMacRomanian();
60
  nsUnicodeToMacRomanian();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToMacRomanian_h___ */
64
#endif /* nsUnicodeToMacRomanian_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToMacTurkish.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToMacTurkish::nsUnicodeToMacTurkish() 
56
nsUnicodeToMacTurkish::nsUnicodeToMacTurkish() 
57
: nsTableEncoderSupport((uShiftTable*) &g_MacTurkishShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_MacTurkishShiftTable, 
58
                        (uMappingTable*) &g_MacTurkishMappingTable)
58
                        (uMappingTable*) &g_MacTurkishMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToMacTurkish::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToMacTurkish.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToMacTurkish_h___
39
#ifndef nsUnicodeToMacTurkish_h___
40
#define nsUnicodeToMacTurkish_h___
40
#define nsUnicodeToMacTurkish_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToMacTurkish [declaration]
45
// Class nsUnicodeToMacTurkish [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToMacTurkish();
60
  nsUnicodeToMacTurkish();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToMacTurkish_h___ */
64
#endif /* nsUnicodeToMacTurkish_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToMacUkrainian.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToMacUkrainian::nsUnicodeToMacUkrainian() 
56
nsUnicodeToMacUkrainian::nsUnicodeToMacUkrainian() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToMacUkrainian::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToMacUkrainian.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToMacUkrainian_h___
39
#ifndef nsUnicodeToMacUkrainian_h___
40
#define nsUnicodeToMacUkrainian_h___
40
#define nsUnicodeToMacUkrainian_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToMacUkrainian [declaration]
45
// Class nsUnicodeToMacUkrainian [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToMacUkrainian();
60
  nsUnicodeToMacUkrainian();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToMacUkrainian_h___ */
64
#endif /* nsUnicodeToMacUkrainian_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToSymbol.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToSymbol::nsUnicodeToSymbol() 
56
nsUnicodeToSymbol::nsUnicodeToSymbol() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToSymbol::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
60
}
(-)intl/uconv/ucvlatin/nsUnicodeToSymbol.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToSymbol_h___
39
#ifndef nsUnicodeToSymbol_h___
40
#define nsUnicodeToSymbol_h___
40
#define nsUnicodeToSymbol_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToSymbol [declaration]
45
// Class nsUnicodeToSymbol [declaration]
 Lines 57-69    Link Here 
57
   */
57
   */
58
  nsUnicodeToSymbol();
58
  nsUnicodeToSymbol();
59
59
60
protected:
61
62
  //--------------------------------------------------------------------
63
  // Subclassing of nsEncoderSupport class [declaration]
64
65
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
66
      PRInt32 * aDestLength);
67
};
60
};
68
61
69
#endif /* nsUnicodeToSymbol_h___ */
62
#endif /* nsUnicodeToSymbol_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToT61.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 56-72    Link Here 
56
56
57
nsUnicodeToT61::nsUnicodeToT61() 
57
nsUnicodeToT61::nsUnicodeToT61() 
58
: nsTableEncoderSupport((uShiftTable*) &g_T61ShiftTable, 
58
: nsTableEncoderSupport((uShiftTable*) &g_T61ShiftTable, 
59
                        (uMappingTable*) &g_T61MappingTable)
59
                        (uMappingTable*) &g_T61MappingTable, 2)
60
{
60
{
61
}
62
63
//----------------------------------------------------------------------
64
// Subclassing of nsTableEncoderSupport class [implementation]
65
66
NS_IMETHODIMP nsUnicodeToT61::GetMaxLength(const PRUnichar * aSrc, 
67
                                              PRInt32 aSrcLength,
68
                                              PRInt32 * aDestLength)
69
{
70
  *aDestLength = 2*aSrcLength;
71
  return NS_OK;
72
}
61
}
(-)intl/uconv/ucvlatin/nsUnicodeToT61.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToT61_h___
39
#ifndef nsUnicodeToT61_h___
40
#define nsUnicodeToT61_h___
40
#define nsUnicodeToT61_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToT61 [declaration]
45
// Class nsUnicodeToT61 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToT61();
60
  nsUnicodeToT61();
61
  
61
  
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToT61_h___ */
64
#endif /* nsUnicodeToT61_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToTCVN5712.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToTCVN5712::nsUnicodeToTCVN5712() 
56
nsUnicodeToTCVN5712::nsUnicodeToTCVN5712() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToTCVN5712::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
60
}
(-)intl/uconv/ucvlatin/nsUnicodeToTCVN5712.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToTCVN5712_h___
39
#ifndef nsUnicodeToTCVN5712_h___
40
#define nsUnicodeToTCVN5712_h___
40
#define nsUnicodeToTCVN5712_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToTCVN5712 [declaration]
45
// Class nsUnicodeToTCVN5712 [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToTCVN5712();
60
  nsUnicodeToTCVN5712();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToTCVN5712_h___ */
64
#endif /* nsUnicodeToTCVN5712_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToUCS2BE.cpp (-8 / +1 lines)
Line     Link Here 
 Lines 56-75    Link Here 
56
56
57
nsUnicodeToUCS2BE::nsUnicodeToUCS2BE() 
57
nsUnicodeToUCS2BE::nsUnicodeToUCS2BE() 
58
: nsTableEncoderSupport((uShiftTable*) &g_UCS2BEShiftTable, 
58
: nsTableEncoderSupport((uShiftTable*) &g_UCS2BEShiftTable, 
59
                        (uMappingTable*) &g_UCS2BEMappingTable)
59
                        (uMappingTable*) &g_UCS2BEMappingTable, 2)
60
{
60
{
61
}
61
}
62
62
63
//----------------------------------------------------------------------
63
//----------------------------------------------------------------------
64
// Subclassing of nsTableEncoderSupport class [implementation]
64
// Subclassing of nsTableEncoderSupport class [implementation]
65
65
66
NS_IMETHODIMP nsUnicodeToUCS2BE::GetMaxLength(const PRUnichar * aSrc, 
67
                                              PRInt32 aSrcLength,
68
                                              PRInt32 * aDestLength)
69
{
70
  *aDestLength = 2*aSrcLength;
71
  return NS_OK_UENC_EXACTLENGTH;
72
}
73
NS_IMETHODIMP nsUnicodeToUCS2BE::FillInfo(PRUint32 *aInfo)
66
NS_IMETHODIMP nsUnicodeToUCS2BE::FillInfo(PRUint32 *aInfo)
74
{
67
{
75
  memset(aInfo, 0xFF, (0x10000L >> 3));
68
  memset(aInfo, 0xFF, (0x10000L >> 3));
(-)intl/uconv/ucvlatin/nsUnicodeToUCS2BE.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToUCS2BE_h___
39
#ifndef nsUnicodeToUCS2BE_h___
40
#define nsUnicodeToUCS2BE_h___
40
#define nsUnicodeToUCS2BE_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToUCS2BE [declaration]
45
// Class nsUnicodeToUCS2BE [declaration]
 Lines 61-73    Link Here 
61
  
61
  
62
  NS_IMETHOD FillInfo(PRUint32* aInfo);
62
  NS_IMETHOD FillInfo(PRUint32* aInfo);
63
63
64
protected:
65
66
  //--------------------------------------------------------------------
67
  // Subclassing of nsEncoderSupport class [declaration]
68
69
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
70
      PRInt32 * aDestLength);
71
};
64
};
72
65
73
nsresult NEW_UnicodeToUTF16BE(nsISupports **Result);
66
nsresult NEW_UnicodeToUTF16BE(nsISupports **Result);
(-)intl/uconv/ucvlatin/nsUnicodeToUCS2LE.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 56-75    Link Here 
56
56
57
nsUnicodeToUCS2LE::nsUnicodeToUCS2LE() 
57
nsUnicodeToUCS2LE::nsUnicodeToUCS2LE() 
58
: nsTableEncoderSupport((uShiftTable*) &g_UCS2LEShiftTable, 
58
: nsTableEncoderSupport((uShiftTable*) &g_UCS2LEShiftTable, 
59
                        (uMappingTable*) &g_UCS2LEMappingTable)
59
                        (uMappingTable*) &g_UCS2LEMappingTable, 2)
60
{
60
{
61
}
61
}
62
62
63
//----------------------------------------------------------------------
64
// Subclassing of nsTableEncoderSupport class [implementation]
65
66
NS_IMETHODIMP nsUnicodeToUCS2LE::GetMaxLength(const PRUnichar * aSrc, 
67
                                              PRInt32 aSrcLength,
68
                                              PRInt32 * aDestLength)
69
{
70
  *aDestLength = 2*aSrcLength;
71
  return NS_OK_UENC_EXACTLENGTH;
72
}
73
NS_IMETHODIMP nsUnicodeToUCS2LE::FillInfo(PRUint32 *aInfo)
63
NS_IMETHODIMP nsUnicodeToUCS2LE::FillInfo(PRUint32 *aInfo)
74
{
64
{
75
  memset(aInfo, 0xFF, (0x10000L >> 3));
65
  memset(aInfo, 0xFF, (0x10000L >> 3));
(-)intl/uconv/ucvlatin/nsUnicodeToUCS2LE.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToUCS2LE_h___
39
#ifndef nsUnicodeToUCS2LE_h___
40
#define nsUnicodeToUCS2LE_h___
40
#define nsUnicodeToUCS2LE_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToUCS2LE [declaration]
45
// Class nsUnicodeToUCS2LE [declaration]
 Lines 61-73    Link Here 
61
  
61
  
62
  NS_IMETHOD FillInfo(PRUint32* aInfo);
62
  NS_IMETHOD FillInfo(PRUint32* aInfo);
63
63
64
protected:
65
66
  //--------------------------------------------------------------------
67
  // Subclassing of nsEncoderSupport class [declaration]
68
69
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
70
      PRInt32 * aDestLength);
71
};
64
};
72
65
73
#endif /* nsUnicodeToUCS2LE_h___ */
66
#endif /* nsUnicodeToUCS2LE_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToUCS4BE.cpp (-8 / +1 lines)
Line     Link Here 
 Lines 56-75    Link Here 
56
56
57
nsUnicodeToUCS4BE::nsUnicodeToUCS4BE() 
57
nsUnicodeToUCS4BE::nsUnicodeToUCS4BE() 
58
: nsTableEncoderSupport((uShiftTable*) &g_UCS4BEShiftTable, 
58
: nsTableEncoderSupport((uShiftTable*) &g_UCS4BEShiftTable, 
59
                        (uMappingTable*) &g_UCS4BEMappingTable)
59
                        (uMappingTable*) &g_UCS4BEMappingTable, 4)
60
{
60
{
61
}
61
}
62
62
63
//----------------------------------------------------------------------
63
//----------------------------------------------------------------------
64
// Subclassing of nsTableEncoderSupport class [implementation]
64
// Subclassing of nsTableEncoderSupport class [implementation]
65
65
66
NS_IMETHODIMP nsUnicodeToUCS4BE::GetMaxLength(const PRUnichar * aSrc, 
67
                                              PRInt32 aSrcLength,
68
                                              PRInt32 * aDestLength)
69
{
70
  *aDestLength = 4*aSrcLength;
71
  return NS_OK_UENC_EXACTLENGTH;
72
}
73
NS_IMETHODIMP nsUnicodeToUCS4BE::FillInfo(PRUint32 *aInfo)
66
NS_IMETHODIMP nsUnicodeToUCS4BE::FillInfo(PRUint32 *aInfo)
74
{
67
{
75
  memset(aInfo, 0xFF, (0x10000L >> 3));
68
  memset(aInfo, 0xFF, (0x10000L >> 3));
(-)intl/uconv/ucvlatin/nsUnicodeToUCS4BE.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToUCS4BE_h___
39
#ifndef nsUnicodeToUCS4BE_h___
40
#define nsUnicodeToUCS4BE_h___
40
#define nsUnicodeToUCS4BE_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToUCS4BE [declaration]
45
// Class nsUnicodeToUCS4BE [declaration]
 Lines 60-72    Link Here 
60
  
60
  
61
  NS_IMETHOD FillInfo(PRUint32* aInfo);
61
  NS_IMETHOD FillInfo(PRUint32* aInfo);
62
62
63
protected:
64
65
  //--------------------------------------------------------------------
66
  // Subclassing of nsEncoderSupport class [declaration]
67
68
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
69
      PRInt32 * aDestLength);
70
};
63
};
71
64
72
#endif /* nsUnicodeToUCS4BE_h___ */
65
#endif /* nsUnicodeToUCS4BE_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToUCS4LE.cpp (-8 / +1 lines)
Line     Link Here 
 Lines 56-75    Link Here 
56
56
57
nsUnicodeToUCS4LE::nsUnicodeToUCS4LE() 
57
nsUnicodeToUCS4LE::nsUnicodeToUCS4LE() 
58
: nsTableEncoderSupport((uShiftTable*) &g_UCS4LEShiftTable, 
58
: nsTableEncoderSupport((uShiftTable*) &g_UCS4LEShiftTable, 
59
                        (uMappingTable*) &g_UCS4LEMappingTable)
59
                        (uMappingTable*) &g_UCS4LEMappingTable, 4)
60
{
60
{
61
}
61
}
62
62
63
//----------------------------------------------------------------------
63
//----------------------------------------------------------------------
64
// Subclassing of nsTableEncoderSupport class [implementation]
64
// Subclassing of nsTableEncoderSupport class [implementation]
65
65
66
NS_IMETHODIMP nsUnicodeToUCS4LE::GetMaxLength(const PRUnichar * aSrc, 
67
                                              PRInt32 aSrcLength,
68
                                              PRInt32 * aDestLength)
69
{
70
  *aDestLength = 4*aSrcLength;
71
  return NS_OK_UENC_EXACTLENGTH;
72
}
73
NS_IMETHODIMP nsUnicodeToUCS4LE::FillInfo(PRUint32 *aInfo)
66
NS_IMETHODIMP nsUnicodeToUCS4LE::FillInfo(PRUint32 *aInfo)
74
{
67
{
75
  memset(aInfo, 0xFF, (0x10000L >> 3));
68
  memset(aInfo, 0xFF, (0x10000L >> 3));
(-)intl/uconv/ucvlatin/nsUnicodeToUCS4LE.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToUCS4LE_h___
39
#ifndef nsUnicodeToUCS4LE_h___
40
#define nsUnicodeToUCS4LE_h___
40
#define nsUnicodeToUCS4LE_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToUCS4LE [declaration]
45
// Class nsUnicodeToUCS4LE [declaration]
 Lines 61-73    Link Here 
61
  
61
  
62
  NS_IMETHOD FillInfo(PRUint32* aInfo);
62
  NS_IMETHOD FillInfo(PRUint32* aInfo);
63
63
64
protected:
65
66
  //--------------------------------------------------------------------
67
  // Subclassing of nsEncoderSupport class [declaration]
68
69
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
70
      PRInt32 * aDestLength);
71
};
64
};
72
65
73
#endif /* nsUnicodeToUCS4LE_h___ */
66
#endif /* nsUnicodeToUCS4LE_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToUEscape.cpp (-1 / +1 lines)
Line     Link Here 
 Lines 38-44    Link Here 
38
38
39
39
40
#include "nsUnicodeToUEscape.h"
40
#include "nsUnicodeToUEscape.h"
41
#include "nsUCvLatinSupport.h"
41
#include "nsUCSupport.h"
42
#include <string.h>
42
#include <string.h>
43
43
44
char hexarray[]="0123456789ABCDEF";
44
char hexarray[]="0123456789ABCDEF";
(-)intl/uconv/ucvlatin/nsUnicodeToUEscape.h (-9 / +2 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToUEscape_h___
39
#ifndef nsUnicodeToUEscape_h___
40
#define nsUnicodeToUEscape_h___
40
#define nsUnicodeToUEscape_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
#include "nsISupports.h"
43
#include "nsISupports.h"
44
44
45
// XXX should we inherited from nsEncoderSupprt ? We don't want the buffer stuff there
45
// XXX should we inherited from nsEncoderSupprt ? We don't want the buffer stuff there
 Lines 50-56    Link Here 
50
  /**
50
  /**
51
   * Class constructor.
51
   * Class constructor.
52
   */
52
   */
53
  nsUnicodeToUEscape() {};
53
  nsUnicodeToUEscape() : nsEncoderSupport(6) {};
54
54
55
  NS_IMETHOD FillInfo(PRUint32* aInfo)
55
  NS_IMETHOD FillInfo(PRUint32* aInfo)
56
  {
56
  {
 Lines 73-85    Link Here 
73
73
74
  //--------------------------------------------------------------------
74
  //--------------------------------------------------------------------
75
  // Subclassing of nsEncoderSupport class [declaration]
75
  // Subclassing of nsEncoderSupport class [declaration]
76
77
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
78
      PRInt32 * aDestLength)
79
  {
80
    *aDestLength = 6*aSrcLength;
81
    return NS_OK;
82
  };
83
76
84
  NS_IMETHOD ConvertNoBuffNoErr(const PRUnichar * aSrc, PRInt32 * aSrcLength, 
77
  NS_IMETHOD ConvertNoBuffNoErr(const PRUnichar * aSrc, PRInt32 * aSrcLength, 
85
      char * aDest, PRInt32 * aDestLength) 
78
      char * aDest, PRInt32 * aDestLength) 
(-)intl/uconv/ucvlatin/nsUnicodeToUTF7.cpp (-10 / +1 lines)
Line     Link Here 
 Lines 49-55    Link Here 
49
// Class nsBasicUTF7Encoder [implementation]
49
// Class nsBasicUTF7Encoder [implementation]
50
50
51
nsBasicUTF7Encoder::nsBasicUTF7Encoder(char aLastChar, char aEscChar) 
51
nsBasicUTF7Encoder::nsBasicUTF7Encoder(char aLastChar, char aEscChar) 
52
: nsEncoderSupport()
52
: nsEncoderSupport(5)
53
{
53
{
54
  mLastChar = aLastChar;
54
  mLastChar = aLastChar;
55
  mEscChar = aEscChar;
55
  mEscChar = aEscChar;
 Lines 294-308    Link Here 
294
                                               PRInt32 * aDestLength)
294
                                               PRInt32 * aDestLength)
295
{
295
{
296
  return ShiftEncoding(ENC_DIRECT, aDest, aDestLength);
296
  return ShiftEncoding(ENC_DIRECT, aDest, aDestLength);
297
}
298
299
NS_IMETHODIMP nsBasicUTF7Encoder::GetMaxLength(const PRUnichar * aSrc, 
300
                                               PRInt32 aSrcLength,
301
                                               PRInt32 * aDestLength)
302
{
303
  // worst case
304
  *aDestLength = 5*aSrcLength;
305
  return NS_OK;
306
}
297
}
307
298
308
NS_IMETHODIMP nsBasicUTF7Encoder::Reset()
299
NS_IMETHODIMP nsBasicUTF7Encoder::Reset()
(-)intl/uconv/ucvlatin/nsUnicodeToUTF7.h (-3 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToUTF7_h___
39
#ifndef nsUnicodeToUTF7_h___
40
#define nsUnicodeToUTF7_h___
40
#define nsUnicodeToUTF7_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsBasicUTF7Encoder [declaration]
45
// Class nsBasicUTF7Encoder [declaration]
 Lines 84-91    Link Here 
84
  NS_IMETHOD ConvertNoBuffNoErr(const PRUnichar * aSrc, PRInt32 * aSrcLength, 
84
  NS_IMETHOD ConvertNoBuffNoErr(const PRUnichar * aSrc, PRInt32 * aSrcLength, 
85
      char * aDest, PRInt32 * aDestLength);
85
      char * aDest, PRInt32 * aDestLength);
86
  NS_IMETHOD FinishNoBuff(char * aDest, PRInt32 * aDestLength);
86
  NS_IMETHOD FinishNoBuff(char * aDest, PRInt32 * aDestLength);
87
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
88
      PRInt32 * aDestLength);
89
  NS_IMETHOD Reset();
87
  NS_IMETHOD Reset();
90
};
88
};
91
89
(-)intl/uconv/ucvlatin/nsUnicodeToUserDefined.cpp (-13 / +1 lines)
Line     Link Here 
 Lines 55-72    Link Here 
55
55
56
nsUnicodeToUserDefined::nsUnicodeToUserDefined() 
56
nsUnicodeToUserDefined::nsUnicodeToUserDefined() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToUserDefined::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
72
(-)intl/uconv/ucvlatin/nsUnicodeToUserDefined.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToUserDefined_h___
39
#ifndef nsUnicodeToUserDefined_h___
40
#define nsUnicodeToUserDefined_h___
40
#define nsUnicodeToUserDefined_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToUserDefined [declaration]
45
// Class nsUnicodeToUserDefined [declaration]
 Lines 58-70    Link Here 
58
   */
58
   */
59
  nsUnicodeToUserDefined();
59
  nsUnicodeToUserDefined();
60
60
61
protected:
62
63
  //--------------------------------------------------------------------
64
  // Subclassing of nsEncoderSupport class [declaration]
65
66
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
67
      PRInt32 * aDestLength);
68
};
61
};
69
62
70
#endif /* nsUnicodeToUserDefined_h___ */
63
#endif /* nsUnicodeToUserDefined_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToVISCII.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToVISCII::nsUnicodeToVISCII() 
56
nsUnicodeToVISCII::nsUnicodeToVISCII() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToVISCII::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToVISCII.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToVISCII_h___
39
#ifndef nsUnicodeToVISCII_h___
40
#define nsUnicodeToVISCII_h___
40
#define nsUnicodeToVISCII_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToVISCII [declaration]
45
// Class nsUnicodeToVISCII [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToVISCII();
60
  nsUnicodeToVISCII();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToVISCII_h___ */
64
#endif /* nsUnicodeToVISCII_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToVPS.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToVPS::nsUnicodeToVPS() 
56
nsUnicodeToVPS::nsUnicodeToVPS() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToVPS::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToVPS.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToVPS_h___
39
#ifndef nsUnicodeToVPS_h___
40
#define nsUnicodeToVPS_h___
40
#define nsUnicodeToVPS_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToVPS [declaration]
45
// Class nsUnicodeToVPS [declaration]
 Lines 59-71    Link Here 
59
   */
59
   */
60
  nsUnicodeToVPS();
60
  nsUnicodeToVPS();
61
61
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
62
};
70
63
71
#endif /* nsUnicodeToVPS_h___ */
64
#endif /* nsUnicodeToVPS_h___ */
(-)intl/uconv/ucvlatin/nsUnicodeToZapfDingbat.cpp (-11 / +1 lines)
Line     Link Here 
 Lines 55-71    Link Here 
55
55
56
nsUnicodeToZapfDingbat::nsUnicodeToZapfDingbat() 
56
nsUnicodeToZapfDingbat::nsUnicodeToZapfDingbat() 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
57
: nsTableEncoderSupport((uShiftTable*) &g_ufShiftTable, 
58
                        (uMappingTable*) &g_ufMappingTable)
58
                        (uMappingTable*) &g_ufMappingTable, 1)
59
{
59
{
60
}
60
}
61
61
62
//----------------------------------------------------------------------
63
// Subclassing of nsTableEncoderSupport class [implementation]
64
65
NS_IMETHODIMP nsUnicodeToZapfDingbat::GetMaxLength(const PRUnichar * aSrc, 
66
                                              PRInt32 aSrcLength,
67
                                              PRInt32 * aDestLength)
68
{
69
  *aDestLength = aSrcLength;
70
  return NS_OK_UENC_EXACTLENGTH;
71
}
(-)intl/uconv/ucvlatin/nsUnicodeToZapfDingbat.h (-8 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToZapfDingbat_h___
39
#ifndef nsUnicodeToZapfDingbat_h___
40
#define nsUnicodeToZapfDingbat_h___
40
#define nsUnicodeToZapfDingbat_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToZapfDingbat [declaration]
45
// Class nsUnicodeToZapfDingbat [declaration]
 Lines 57-69    Link Here 
57
   */
57
   */
58
  nsUnicodeToZapfDingbat();
58
  nsUnicodeToZapfDingbat();
59
59
60
protected:
61
62
  //--------------------------------------------------------------------
63
  // Subclassing of nsEncoderSupport class [declaration]
64
65
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
66
      PRInt32 * aDestLength);
67
};
60
};
68
61
69
#endif /* nsUnicodeToZapfDingbat_h___ */
62
#endif /* nsUnicodeToZapfDingbat_h___ */
(-)intl/uconv/ucvlatin/nsUserDefinedToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUserDefinedToUnicode_h___
39
#ifndef nsUserDefinedToUnicode_h___
40
#define nsUserDefinedToUnicode_h___
40
#define nsUserDefinedToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUserDefinedToUnicode [declaration]
45
// Class nsUserDefinedToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsVISCIIToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsVISCIIToUnicode_h___
39
#ifndef nsVISCIIToUnicode_h___
40
#define nsVISCIIToUnicode_h___
40
#define nsVISCIIToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsVISCIIToUnicode [declaration]
45
// Class nsVISCIIToUnicode [declaration]
(-)intl/uconv/ucvlatin/nsVPSToUnicode.h (-1 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsVPSToUnicode_h___
39
#ifndef nsVPSToUnicode_h___
40
#define nsVPSToUnicode_h___
40
#define nsVPSToUnicode_h___
41
41
42
#include "nsUCvLatinSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsVPSToUnicode [declaration]
45
// Class nsVPSToUnicode [declaration]
(-)intl/uconv/ucvtw/Makefile.in (-6 / +3 lines)
Line     Link Here 
 Lines 27-36    Link Here 
27
include $(DEPTH)/config/autoconf.mk
27
include $(DEPTH)/config/autoconf.mk
28
28
29
MODULE		= ucvtw
29
MODULE		= ucvtw
30
LIBRARY_NAME	= ucvtw
30
LIBRARY_NAME	= ucvtw_s
31
EXPORT_LIBRARY = 1
32
IS_COMPONENT	= 1
33
MODULE_NAME	= nsUCvTWModule
31
MODULE_NAME	= nsUCvTWModule
32
FORCE_STATIC_LIB=1
34
REQUIRES	= xpcom \
33
REQUIRES	= xpcom \
35
		  string \
34
		  string \
36
		  uconv \
35
		  uconv \
 Lines 45-57    Link Here 
45
		nsCP950ToUnicode.cpp \
44
		nsCP950ToUnicode.cpp \
46
		nsUnicodeToCP950.cpp \
45
		nsUnicodeToCP950.cpp \
47
		nsUnicodeToBIG5NoAscii.cpp \
46
		nsUnicodeToBIG5NoAscii.cpp \
48
		nsUCvTWSupport.cpp \
49
		nsUCvTwModule.cpp \
50
		$(NULL)
47
		$(NULL)
51
48
52
EXPORTS		= nsUCvTWCID.h
49
EXPORTS		= nsUCvTWCID.h
53
50
54
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS)
51
LOCAL_INCLUDES = -I$(srcdir)/../util
55
52
56
include $(topsrcdir)/config/rules.mk
53
include $(topsrcdir)/config/rules.mk
57
54
(-)intl/uconv/ucvtw/nsBIG5HKSCSToUnicode.cpp (-12 / +2 lines)
Line     Link Here 
 Lines 88-106    Link Here 
88
: nsMultiTableDecoderSupport(6,
88
: nsMultiTableDecoderSupport(6,
89
                            (uRange* ) &g_BIG5HKSCSRanges,
89
                            (uRange* ) &g_BIG5HKSCSRanges,
90
                            (uShiftTable**) &g_BIG5HKSCSShiftTableSet,
90
                            (uShiftTable**) &g_BIG5HKSCSShiftTableSet,
91
                            (uMappingTable**) &g_BIG5HKSCSMappingTableSet)
91
                            (uMappingTable**) &g_BIG5HKSCSMappingTableSet,
92
                             1)
92
{
93
{
93
}
94
}
94
95
95
96
96
//----------------------------------------------------------------------
97
// Subclassing of nsMultiTableDecoderSupport class [implementation]
98
99
NS_IMETHODIMP nsBIG5HKSCSToUnicode::GetMaxLength(const char * aSrc,
100
                                              PRInt32 aSrcLength,
101
                                              PRInt32 * aDestLength)
102
{
103
  // we are a single byte to Unicode converter, so...
104
  *aDestLength = aSrcLength;
105
  return NS_OK_UDEC_EXACTLENGTH;
106
}
(-)intl/uconv/ucvtw/nsBIG5HKSCSToUnicode.h (-7 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsBIG5HKSCSToUnicode_h___
39
#ifndef nsBIG5HKSCSToUnicode_h___
40
#define nsBIG5HKSCSToUnicode_h___
40
#define nsBIG5HKSCSToUnicode_h___
41
41
42
#include "nsUCvTWSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsBIG5HKSCSToUnicode [declaration]
45
// Class nsBIG5HKSCSToUnicode [declaration]
 Lines 60-71    Link Here 
60
  nsBIG5HKSCSToUnicode();
60
  nsBIG5HKSCSToUnicode();
61
61
62
protected:
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsDecoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength,
68
      PRInt32 * aDestLength);
69
};
63
};
70
64
71
#endif /* nsBIG5HKSCSToUnicode_h___ */
65
#endif /* nsBIG5HKSCSToUnicode_h___ */
(-)intl/uconv/ucvtw/nsBIG5ToUnicode.cpp (-12 / +1 lines)
Line     Link Here 
 Lines 75-93    Link Here 
75
: nsMultiTableDecoderSupport(2, 
75
: nsMultiTableDecoderSupport(2, 
76
                            (uRange* ) &g_BIG5Ranges,
76
                            (uRange* ) &g_BIG5Ranges,
77
                            (uShiftTable**) &g_BIG5ShiftTableSet, 
77
                            (uShiftTable**) &g_BIG5ShiftTableSet, 
78
                            (uMappingTable**) &g_BIG5MappingTableSet)
78
                            (uMappingTable**) &g_BIG5MappingTableSet, 1)
79
{
79
{
80
}
80
}
81
81
82
82
83
//----------------------------------------------------------------------
84
// Subclassing of nsMultiTableDecoderSupport class [implementation]
85
86
NS_IMETHODIMP nsBIG5ToUnicode::GetMaxLength(const char * aSrc, 
87
                                              PRInt32 aSrcLength, 
88
                                              PRInt32 * aDestLength)
89
{
90
  // we are a single byte to Unicode converter, so...
91
  *aDestLength = aSrcLength;
92
  return NS_OK_UDEC_EXACTLENGTH;
93
}
(-)intl/uconv/ucvtw/nsBIG5ToUnicode.h (-6 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsBIG5ToUnicode_h___
39
#ifndef nsBIG5ToUnicode_h___
40
#define nsBIG5ToUnicode_h___
40
#define nsBIG5ToUnicode_h___
41
41
42
#include "nsUCvTWSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsBIG5ToUnicode [declaration]
45
// Class nsBIG5ToUnicode [declaration]
 Lines 61-71    Link Here 
61
61
62
protected:
62
protected:
63
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsDecoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
64
};
70
65
71
#endif /* nsBIG5ToUnicode_h___ */
66
#endif /* nsBIG5ToUnicode_h___ */
(-)intl/uconv/ucvtw/nsUnicodeToBIG5.cpp (-13 / +3 lines)
Line     Link Here 
 Lines 69-87    Link Here 
69
69
70
nsUnicodeToBIG5::nsUnicodeToBIG5() 
70
nsUnicodeToBIG5::nsUnicodeToBIG5() 
71
: nsMultiTableEncoderSupport(2,
71
: nsMultiTableEncoderSupport(2,
72
                        (uShiftTable**) &g_Big5ShiftTable, 
72
                             (uShiftTable**) &g_Big5ShiftTable, 
73
                        (uMappingTable**) &g_Big5MappingTable)
73
                             (uMappingTable**) &g_Big5MappingTable,
74
                             2 /* max length = src * 2 */)
74
{
75
{
75
}
76
}
76
77
77
78
//----------------------------------------------------------------------
79
// Subclassing of nsTableEncoderSupport class [implementation]
80
81
NS_IMETHODIMP nsUnicodeToBIG5::GetMaxLength(const PRUnichar * aSrc, 
82
                                              PRInt32 aSrcLength,
83
                                              PRInt32 * aDestLength)
84
{
85
  *aDestLength = 2 * aSrcLength;
86
  return NS_OK;
87
}
(-)intl/uconv/ucvtw/nsUnicodeToBIG5.h (-7 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToBIG5_h___
39
#ifndef nsUnicodeToBIG5_h___
40
#define nsUnicodeToBIG5_h___
40
#define nsUnicodeToBIG5_h___
41
41
42
#include "nsUCvTWSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToBIG5 [declaration]
45
// Class nsUnicodeToBIG5 [declaration]
 Lines 60-71    Link Here 
60
  nsUnicodeToBIG5();
60
  nsUnicodeToBIG5();
61
61
62
protected:
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
63
};
70
64
71
#endif /* nsUnicodeToBIG5_h___ */
65
#endif /* nsUnicodeToBIG5_h___ */
(-)intl/uconv/ucvtw/nsUnicodeToBIG5HKSCS.cpp (-12 / +3 lines)
Line     Link Here 
 Lines 71-89    Link Here 
71
71
72
nsUnicodeToBIG5HKSCS::nsUnicodeToBIG5HKSCS()
72
nsUnicodeToBIG5HKSCS::nsUnicodeToBIG5HKSCS()
73
: nsMultiTableEncoderSupport(3,
73
: nsMultiTableEncoderSupport(3,
74
                        (uShiftTable**) &g_Big5HKSCSShiftTable,
74
                             (uShiftTable**) &g_Big5HKSCSShiftTable,
75
                        (uMappingTable**) &g_Big5HKSCSMappingTable)
75
                             (uMappingTable**) &g_Big5HKSCSMappingTable,
76
                             2 /* max length = src * 2 */)
76
{
77
{
77
}
78
}
78
79
79
80
80
//----------------------------------------------------------------------
81
// Subclassing of nsTableEncoderSupport class [implementation]
82
83
NS_IMETHODIMP nsUnicodeToBIG5HKSCS::GetMaxLength(const PRUnichar * aSrc,
84
                                              PRInt32 aSrcLength,
85
                                              PRInt32 * aDestLength)
86
{
87
  *aDestLength = 2 * aSrcLength;
88
  return NS_OK;
89
}
(-)intl/uconv/ucvtw/nsUnicodeToBIG5HKSCS.h (-7 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToBIG5HKSCS_h___
39
#ifndef nsUnicodeToBIG5HKSCS_h___
40
#define nsUnicodeToBIG5HKSCS_h___
40
#define nsUnicodeToBIG5HKSCS_h___
41
41
42
#include "nsUCvTWSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToBIG5HKSCS [declaration]
45
// Class nsUnicodeToBIG5HKSCS [declaration]
 Lines 60-71    Link Here 
60
  nsUnicodeToBIG5HKSCS();
60
  nsUnicodeToBIG5HKSCS();
61
61
62
protected:
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength,
68
      PRInt32 * aDestLength);
69
};
63
};
70
64
71
#endif /* nsUnicodeToBIG5HKSCS_h___ */
65
#endif /* nsUnicodeToBIG5HKSCS_h___ */
(-)intl/uconv/ucvtw/nsUnicodeToBIG5NoAscii.cpp (-11 / +2 lines)
Line     Link Here 
 Lines 53-73    Link Here 
53
53
54
nsUnicodeToBIG5NoAscii::nsUnicodeToBIG5NoAscii() 
54
nsUnicodeToBIG5NoAscii::nsUnicodeToBIG5NoAscii() 
55
: nsTableEncoderSupport( (uShiftTable*) &gBig5ShiftTable, 
55
: nsTableEncoderSupport( (uShiftTable*) &gBig5ShiftTable, 
56
                        (uMappingTable*) &g_ufBig5Mapping)
56
                        (uMappingTable*) &g_ufBig5Mapping,
57
                         2 /* max length = src * 2 */)
57
{
58
{
58
}
59
}
59
60
60
61
61
//----------------------------------------------------------------------
62
// Subclassing of nsTableEncoderSupport class [implementation]
63
64
NS_IMETHODIMP nsUnicodeToBIG5NoAscii::GetMaxLength(const PRUnichar * aSrc, 
65
                                              PRInt32 aSrcLength,
66
                                              PRInt32 * aDestLength)
67
{
68
  *aDestLength = 2 * aSrcLength;
69
  return NS_OK_UENC_EXACTLENGTH;
70
}
71
NS_IMETHODIMP nsUnicodeToBIG5NoAscii::FillInfo(PRUint32 *aInfo)
62
NS_IMETHODIMP nsUnicodeToBIG5NoAscii::FillInfo(PRUint32 *aInfo)
72
{
63
{
73
  nsresult rv = nsTableEncoderSupport::FillInfo(aInfo); // call the super class
64
  nsresult rv = nsTableEncoderSupport::FillInfo(aInfo); // call the super class
(-)intl/uconv/ucvtw/nsUnicodeToBIG5NoAscii.h (-7 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToBIG5NoAscii_h___
39
#ifndef nsUnicodeToBIG5NoAscii_h___
40
#define nsUnicodeToBIG5NoAscii_h___
40
#define nsUnicodeToBIG5NoAscii_h___
41
41
42
#include "nsUCvTWSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToBIG5NoAscii [declaration]
45
// Class nsUnicodeToBIG5NoAscii [declaration]
 Lines 59-70    Link Here 
59
59
60
  NS_IMETHOD FillInfo(PRUint32 *aInfo);
60
  NS_IMETHOD FillInfo(PRUint32 *aInfo);
61
protected:
61
protected:
62
63
  //--------------------------------------------------------------------
64
  // Subclassing of nsEncoderSupport class [declaration]
65
66
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
67
      PRInt32 * aDestLength);
68
};
62
};
69
63
70
#endif /* nsUnicodeToBIG5NoAscii_h___ */
64
#endif /* nsUnicodeToBIG5NoAscii_h___ */
(-)intl/uconv/ucvtw/nsUnicodeToHKSCS.cpp (-13 / +3 lines)
Line     Link Here 
 Lines 63-81    Link Here 
63
63
64
nsUnicodeToHKSCS::nsUnicodeToHKSCS()
64
nsUnicodeToHKSCS::nsUnicodeToHKSCS()
65
: nsMultiTableEncoderSupport(1,
65
: nsMultiTableEncoderSupport(1,
66
                        (uShiftTable**) &g_Big5HKSCSShiftTable,
66
                             (uShiftTable**) &g_Big5HKSCSShiftTable,
67
                        (uMappingTable**) &g_Big5HKSCSMappingTable)
67
                             (uMappingTable**) &g_Big5HKSCSMappingTable,
68
                             2 /* max length = src * 2 */)
68
{
69
{
69
}
70
}
70
71
71
72
//----------------------------------------------------------------------
73
// Subclassing of nsTableEncoderSupport class [implementation]
74
75
NS_IMETHODIMP nsUnicodeToHKSCS::GetMaxLength(const PRUnichar * aSrc,
76
                                              PRInt32 aSrcLength,
77
                                              PRInt32 * aDestLength)
78
{
79
  *aDestLength = 2 * aSrcLength;
80
  return NS_OK_UDEC_EXACTLENGTH;
81
}
(-)intl/uconv/ucvtw/nsUnicodeToHKSCS.h (-7 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToHKSCS_h___
39
#ifndef nsUnicodeToHKSCS_h___
40
#define nsUnicodeToHKSCS_h___
40
#define nsUnicodeToHKSCS_h___
41
41
42
#include "nsUCvTWSupport.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToHKSCS [declaration]
45
// Class nsUnicodeToHKSCS [declaration]
 Lines 58-69    Link Here 
58
  nsUnicodeToHKSCS();
58
  nsUnicodeToHKSCS();
59
59
60
protected:
60
protected:
61
62
  //--------------------------------------------------------------------
63
  // Subclassing of nsEncoderSupport class [declaration]
64
65
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength,
66
      PRInt32 * aDestLength);
67
};
61
};
68
62
69
#endif /* nsUnicodeToHKSCS_h___ */
63
#endif /* nsUnicodeToHKSCS_h___ */
(-)intl/uconv/ucvtw2/Makefile.in (-5 / +9 lines)
Line     Link Here 
 Lines 27-35    Link Here 
27
include $(DEPTH)/config/autoconf.mk
27
include $(DEPTH)/config/autoconf.mk
28
28
29
MODULE		= ucvtw2
29
MODULE		= ucvtw2
30
LIBRARY_NAME	= ucvtw2
30
LIBRARY_NAME	= ucvtw2_s
31
EXPORT_LIBRARY = 1
31
#EXPORT_LIBRARY = 1
32
IS_COMPONENT	= 1
32
#IS_COMPONENT	= 1
33
FORCE_STATIC_LIB=1
33
MODULE_NAME	= nsUCvTW2Module
34
MODULE_NAME	= nsUCvTW2Module
34
REQUIRES	= xpcom \
35
REQUIRES	= xpcom \
35
		  string \
36
		  string \
 Lines 46-54    Link Here 
46
		nsUnicodeToCNS11643p5.cpp \
47
		nsUnicodeToCNS11643p5.cpp \
47
		nsUnicodeToCNS11643p6.cpp \
48
		nsUnicodeToCNS11643p6.cpp \
48
		nsUnicodeToCNS11643p7.cpp \
49
		nsUnicodeToCNS11643p7.cpp \
49
		nsUCvTW2Support.cpp \
50
#		nsUCvTw2Module.cpp \
50
		nsUCvTw2Module.cpp \
51
		$(NULL)
51
		$(NULL)
52
53
#SHARED_LIBRARY_LIBS = $(DIST)/lib/$(LIB_PREFIX)ucvutil_s.$(LIB_SUFFIX)
54
55
LOCAL_INCLUDES	= -I$(srcdir)/../util
52
56
53
EXPORTS		= nsUCvTW2CID.h
57
EXPORTS		= nsUCvTW2CID.h
54
58
(-)intl/uconv/ucvtw2/nsEUCTWToUnicode.cpp (-15 / +4 lines)
Line     Link Here 
 Lines 119-138    Link Here 
119
119
120
nsEUCTWToUnicode::nsEUCTWToUnicode() 
120
nsEUCTWToUnicode::nsEUCTWToUnicode() 
121
: nsMultiTableDecoderSupport(8, 
121
: nsMultiTableDecoderSupport(8, 
122
                        (uRange*) &g_EUCTWRanges, 
122
                             (uRange*) &g_EUCTWRanges, 
123
                        (uShiftTable**) &g_EUCTWShiftTableSet, 
123
                             (uShiftTable**) &g_EUCTWShiftTableSet, 
124
                        (uMappingTable**) &g_EUCTWMappingTableSet)
124
                             (uMappingTable**) &g_EUCTWMappingTableSet,
125
                             1)
125
{
126
{
126
}
127
128
//----------------------------------------------------------------------
129
// Subclassing of nsTablesDecoderSupport class [implementation]
130
131
NS_IMETHODIMP nsEUCTWToUnicode::GetMaxLength(const char * aSrc, 
132
                                              PRInt32 aSrcLength, 
133
                                              PRInt32 * aDestLength)
134
{
135
  // we are a single byte to Unicode converter, so...
136
  *aDestLength = aSrcLength;
137
  return NS_OK_UDEC_EXACTLENGTH;
138
}
127
}
(-)intl/uconv/ucvtw2/nsEUCTWToUnicode.h (-6 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsEUCTWToUnicode_h___
39
#ifndef nsEUCTWToUnicode_h___
40
#define nsEUCTWToUnicode_h___
40
#define nsEUCTWToUnicode_h___
41
41
42
#include "nsUCvTW2Support.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsEUCTWToUnicode [declaration]
45
// Class nsEUCTWToUnicode [declaration]
 Lines 61-71    Link Here 
61
61
62
protected:
62
protected:
63
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsDecoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
64
};
70
65
71
#endif /* nsEUCTWToUnicode_h___ */
66
#endif /* nsEUCTWToUnicode_h___ */
(-)intl/uconv/ucvtw2/nsUnicodeToCNS11643p1.cpp (-11 / +2 lines)
Line     Link Here 
 Lines 52-68    Link Here 
52
52
53
nsUnicodeToCNS11643p1::nsUnicodeToCNS11643p1() 
53
nsUnicodeToCNS11643p1::nsUnicodeToCNS11643p1() 
54
: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, 
54
: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, 
55
                        (uMappingTable*) &g_ufCNS1MappingTable)
55
                        (uMappingTable*) &g_ufCNS1MappingTable,
56
                        2 /* max length = src * 2 */)
56
{
57
{
57
}
58
}
58
59
59
//----------------------------------------------------------------------
60
// Subclassing of nsTableEncoderSupport class [implementation]
61
62
NS_IMETHODIMP nsUnicodeToCNS11643p1::GetMaxLength(const PRUnichar * aSrc, 
63
                                              PRInt32 aSrcLength,
64
                                              PRInt32 * aDestLength)
65
{
66
  *aDestLength = 2 * aSrcLength;
67
  return NS_OK_UENC_EXACTLENGTH;
68
}
(-)intl/uconv/ucvtw2/nsUnicodeToCNS11643p1.h (-7 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToCNS11643p1_h___
39
#ifndef nsUnicodeToCNS11643p1_h___
40
#define nsUnicodeToCNS11643p1_h___
40
#define nsUnicodeToCNS11643p1_h___
41
41
42
#include "nsUCvTW2Support.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToCNS11643p1 [declaration]
45
// Class nsUnicodeToCNS11643p1 [declaration]
 Lines 60-71    Link Here 
60
  nsUnicodeToCNS11643p1();
60
  nsUnicodeToCNS11643p1();
61
61
62
protected:
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
63
};
70
64
71
#endif /* nsUnicodeToCNS11643p1_h___ */
65
#endif /* nsUnicodeToCNS11643p1_h___ */
(-)intl/uconv/ucvtw2/nsUnicodeToCNS11643p2.cpp (-11 / +2 lines)
Line     Link Here 
 Lines 52-68    Link Here 
52
52
53
nsUnicodeToCNS11643p2::nsUnicodeToCNS11643p2() 
53
nsUnicodeToCNS11643p2::nsUnicodeToCNS11643p2() 
54
: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, 
54
: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, 
55
                        (uMappingTable*) &g_ufCNS2MappingTable)
55
                        (uMappingTable*) &g_ufCNS2MappingTable,
56
                        2 /* max length = src * 2 */)
56
{
57
{
57
}
58
}
58
59
59
//----------------------------------------------------------------------
60
// Subclassing of nsTableEncoderSupport class [implementation]
61
62
NS_IMETHODIMP nsUnicodeToCNS11643p2::GetMaxLength(const PRUnichar * aSrc, 
63
                                              PRInt32 aSrcLength,
64
                                              PRInt32 * aDestLength)
65
{
66
  *aDestLength = 2 * aSrcLength;
67
  return NS_OK_UENC_EXACTLENGTH;
68
}
(-)intl/uconv/ucvtw2/nsUnicodeToCNS11643p2.h (-7 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToCNS11643p2_h___
39
#ifndef nsUnicodeToCNS11643p2_h___
40
#define nsUnicodeToCNS11643p2_h___
40
#define nsUnicodeToCNS11643p2_h___
41
41
42
#include "nsUCvTW2Support.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToCNS11643p2 [declaration]
45
// Class nsUnicodeToCNS11643p2 [declaration]
 Lines 60-71    Link Here 
60
  nsUnicodeToCNS11643p2();
60
  nsUnicodeToCNS11643p2();
61
61
62
protected:
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
63
};
70
64
71
#endif /* nsUnicodeToCNS11643p2_h___ */
65
#endif /* nsUnicodeToCNS11643p2_h___ */
(-)intl/uconv/ucvtw2/nsUnicodeToCNS11643p3.cpp (-11 / +2 lines)
Line     Link Here 
 Lines 52-68    Link Here 
52
52
53
nsUnicodeToCNS11643p3::nsUnicodeToCNS11643p3() 
53
nsUnicodeToCNS11643p3::nsUnicodeToCNS11643p3() 
54
: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, 
54
: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, 
55
                        (uMappingTable*) &g_ufCNS3MappingTable)
55
                        (uMappingTable*) &g_ufCNS3MappingTable,
56
                        2 /* max length = src * 2 */)
56
{
57
{
57
}
58
}
58
59
59
//----------------------------------------------------------------------
60
// Subclassing of nsTableEncoderSupport class [implementation]
61
62
NS_IMETHODIMP nsUnicodeToCNS11643p3::GetMaxLength(const PRUnichar * aSrc, 
63
                                              PRInt32 aSrcLength,
64
                                              PRInt32 * aDestLength)
65
{
66
  *aDestLength = 2 * aSrcLength;
67
  return NS_OK_UENC_EXACTLENGTH;
68
}
(-)intl/uconv/ucvtw2/nsUnicodeToCNS11643p3.h (-7 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToCNS11643p3_h___
39
#ifndef nsUnicodeToCNS11643p3_h___
40
#define nsUnicodeToCNS11643p3_h___
40
#define nsUnicodeToCNS11643p3_h___
41
41
42
#include "nsUCvTW2Support.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToCNS11643p3 [declaration]
45
// Class nsUnicodeToCNS11643p3 [declaration]
 Lines 60-71    Link Here 
60
  nsUnicodeToCNS11643p3();
60
  nsUnicodeToCNS11643p3();
61
61
62
protected:
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
63
};
70
64
71
#endif /* nsUnicodeToCNS11643p3_h___ */
65
#endif /* nsUnicodeToCNS11643p3_h___ */
(-)intl/uconv/ucvtw2/nsUnicodeToCNS11643p4.cpp (-11 / +2 lines)
Line     Link Here 
 Lines 52-68    Link Here 
52
52
53
nsUnicodeToCNS11643p4::nsUnicodeToCNS11643p4() 
53
nsUnicodeToCNS11643p4::nsUnicodeToCNS11643p4() 
54
: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, 
54
: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, 
55
                        (uMappingTable*) &g_ufCNS4MappingTable)
55
                        (uMappingTable*) &g_ufCNS4MappingTable,
56
                        2 /* max length = src * 2 */)
56
{
57
{
57
}
58
}
58
59
59
//----------------------------------------------------------------------
60
// Subclassing of nsTableEncoderSupport class [implementation]
61
62
NS_IMETHODIMP nsUnicodeToCNS11643p4::GetMaxLength(const PRUnichar * aSrc, 
63
                                              PRInt32 aSrcLength,
64
                                              PRInt32 * aDestLength)
65
{
66
  *aDestLength = 2 * aSrcLength;
67
  return NS_OK_UENC_EXACTLENGTH;
68
}
(-)intl/uconv/ucvtw2/nsUnicodeToCNS11643p4.h (-7 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToCNS11643p4_h___
39
#ifndef nsUnicodeToCNS11643p4_h___
40
#define nsUnicodeToCNS11643p4_h___
40
#define nsUnicodeToCNS11643p4_h___
41
41
42
#include "nsUCvTW2Support.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToCNS11643p4 [declaration]
45
// Class nsUnicodeToCNS11643p4 [declaration]
 Lines 60-71    Link Here 
60
  nsUnicodeToCNS11643p4();
60
  nsUnicodeToCNS11643p4();
61
61
62
protected:
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
63
};
70
64
71
#endif /* nsUnicodeToCNS11643p4_h___ */
65
#endif /* nsUnicodeToCNS11643p4_h___ */
(-)intl/uconv/ucvtw2/nsUnicodeToCNS11643p5.cpp (-11 / +2 lines)
Line     Link Here 
 Lines 52-68    Link Here 
52
52
53
nsUnicodeToCNS11643p5::nsUnicodeToCNS11643p5() 
53
nsUnicodeToCNS11643p5::nsUnicodeToCNS11643p5() 
54
: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, 
54
: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, 
55
                        (uMappingTable*) &g_ufCNS5MappingTable)
55
                        (uMappingTable*) &g_ufCNS5MappingTable,
56
                        2 /* max length = src * 2 */)
56
{
57
{
57
}
58
}
58
59
59
//----------------------------------------------------------------------
60
// Subclassing of nsTableEncoderSupport class [implementation]
61
62
NS_IMETHODIMP nsUnicodeToCNS11643p5::GetMaxLength(const PRUnichar * aSrc, 
63
                                              PRInt32 aSrcLength,
64
                                              PRInt32 * aDestLength)
65
{
66
  *aDestLength = 2 * aSrcLength;
67
  return NS_OK_UENC_EXACTLENGTH;
68
}
(-)intl/uconv/ucvtw2/nsUnicodeToCNS11643p5.h (-7 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToCNS11643p5_h___
39
#ifndef nsUnicodeToCNS11643p5_h___
40
#define nsUnicodeToCNS11643p5_h___
40
#define nsUnicodeToCNS11643p5_h___
41
41
42
#include "nsUCvTW2Support.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToCNS11643p5 [declaration]
45
// Class nsUnicodeToCNS11643p5 [declaration]
 Lines 60-71    Link Here 
60
  nsUnicodeToCNS11643p5();
60
  nsUnicodeToCNS11643p5();
61
61
62
protected:
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
63
};
70
64
71
#endif /* nsUnicodeToCNS11643p5_h___ */
65
#endif /* nsUnicodeToCNS11643p5_h___ */
(-)intl/uconv/ucvtw2/nsUnicodeToCNS11643p6.cpp (-11 / +2 lines)
Line     Link Here 
 Lines 52-68    Link Here 
52
52
53
nsUnicodeToCNS11643p6::nsUnicodeToCNS11643p6() 
53
nsUnicodeToCNS11643p6::nsUnicodeToCNS11643p6() 
54
: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, 
54
: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, 
55
                        (uMappingTable*) &g_ufCNS6MappingTable)
55
                        (uMappingTable*) &g_ufCNS6MappingTable,
56
                        2 /* max length = src * 2 */)
56
{
57
{
57
}
58
}
58
59
59
//----------------------------------------------------------------------
60
// Subclassing of nsTableEncoderSupport class [implementation]
61
62
NS_IMETHODIMP nsUnicodeToCNS11643p6::GetMaxLength(const PRUnichar * aSrc, 
63
                                              PRInt32 aSrcLength,
64
                                              PRInt32 * aDestLength)
65
{
66
  *aDestLength = 2 * aSrcLength;
67
  return NS_OK_UENC_EXACTLENGTH;
68
}
(-)intl/uconv/ucvtw2/nsUnicodeToCNS11643p6.h (-7 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToCNS11643p6_h___
39
#ifndef nsUnicodeToCNS11643p6_h___
40
#define nsUnicodeToCNS11643p6_h___
40
#define nsUnicodeToCNS11643p6_h___
41
41
42
#include "nsUCvTW2Support.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToCNS11643p6 [declaration]
45
// Class nsUnicodeToCNS11643p6 [declaration]
 Lines 60-71    Link Here 
60
  nsUnicodeToCNS11643p6();
60
  nsUnicodeToCNS11643p6();
61
61
62
protected:
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
63
};
70
64
71
#endif /* nsUnicodeToCNS11643p6_h___ */
65
#endif /* nsUnicodeToCNS11643p6_h___ */
(-)intl/uconv/ucvtw2/nsUnicodeToCNS11643p7.cpp (-11 / +2 lines)
Line     Link Here 
 Lines 52-68    Link Here 
52
52
53
nsUnicodeToCNS11643p7::nsUnicodeToCNS11643p7() 
53
nsUnicodeToCNS11643p7::nsUnicodeToCNS11643p7() 
54
: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, 
54
: nsTableEncoderSupport((uShiftTable*) &g_ShiftTable, 
55
                        (uMappingTable*) &g_ufCNS7MappingTable)
55
                        (uMappingTable*) &g_ufCNS7MappingTable,
56
                        2 /* max length = src * 2 */)
56
{
57
{
57
}
58
}
58
59
59
//----------------------------------------------------------------------
60
// Subclassing of nsTableEncoderSupport class [implementation]
61
62
NS_IMETHODIMP nsUnicodeToCNS11643p7::GetMaxLength(const PRUnichar * aSrc, 
63
                                              PRInt32 aSrcLength,
64
                                              PRInt32 * aDestLength)
65
{
66
  *aDestLength = 2 * aSrcLength;
67
  return NS_OK_UENC_EXACTLENGTH;
68
}
(-)intl/uconv/ucvtw2/nsUnicodeToCNS11643p7.h (-7 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToCNS11643p7_h___
39
#ifndef nsUnicodeToCNS11643p7_h___
40
#define nsUnicodeToCNS11643p7_h___
40
#define nsUnicodeToCNS11643p7_h___
41
41
42
#include "nsUCvTW2Support.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToCNS11643p7 [declaration]
45
// Class nsUnicodeToCNS11643p7 [declaration]
 Lines 60-71    Link Here 
60
  nsUnicodeToCNS11643p7();
60
  nsUnicodeToCNS11643p7();
61
61
62
protected:
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
63
};
70
64
71
#endif /* nsUnicodeToCNS11643p7_h___ */
65
#endif /* nsUnicodeToCNS11643p7_h___ */
(-)intl/uconv/ucvtw2/nsUnicodeToEUCTW.cpp (-12 / +3 lines)
Line     Link Here 
 Lines 105-122    Link Here 
105
105
106
nsUnicodeToEUCTW::nsUnicodeToEUCTW() 
106
nsUnicodeToEUCTW::nsUnicodeToEUCTW() 
107
: nsMultiTableEncoderSupport( 8,
107
: nsMultiTableEncoderSupport( 8,
108
                        (uShiftTable**) &g_EUCTWShiftTableSet, 
108
                              (uShiftTable**) &g_EUCTWShiftTableSet, 
109
                        (uMappingTable**) &g_EUCTWMappingTableSet)
109
                              (uMappingTable**) &g_EUCTWMappingTableSet,
110
                              4 /* max length = src * 4 */)
110
{
111
{
111
}
112
}
112
113
113
//----------------------------------------------------------------------
114
// Subclassing of nsTableEncoderSupport class [implementation]
115
116
NS_IMETHODIMP nsUnicodeToEUCTW::GetMaxLength(const PRUnichar * aSrc, 
117
                                              PRInt32 aSrcLength,
118
                                              PRInt32 * aDestLength)
119
{
120
  *aDestLength = 4 * aSrcLength;
121
  return NS_OK;
122
}
(-)intl/uconv/ucvtw2/nsUnicodeToEUCTW.h (-7 / +1 lines)
Line     Link Here 
 Lines 39-45    Link Here 
39
#ifndef nsUnicodeToEUCTW_h___
39
#ifndef nsUnicodeToEUCTW_h___
40
#define nsUnicodeToEUCTW_h___
40
#define nsUnicodeToEUCTW_h___
41
41
42
#include "nsUCvTW2Support.h"
42
#include "nsUCSupport.h"
43
43
44
//----------------------------------------------------------------------
44
//----------------------------------------------------------------------
45
// Class nsUnicodeToEUCTW [declaration]
45
// Class nsUnicodeToEUCTW [declaration]
 Lines 60-71    Link Here 
60
  nsUnicodeToEUCTW();
60
  nsUnicodeToEUCTW();
61
61
62
protected:
62
protected:
63
64
  //--------------------------------------------------------------------
65
  // Subclassing of nsEncoderSupport class [declaration]
66
67
  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength, 
68
      PRInt32 * aDestLength);
69
};
63
};
70
64
71
#endif /* nsUnicodeToEUCTW_h___ */
65
#endif /* nsUnicodeToEUCTW_h___ */
(-)intl/uconv/ucvwestern/Makefile.in (-2 lines)
Line     Link Here 
 Lines 42-54    Link Here 
42
42
43
SHARED_LIBRARY_LIBS = \
43
SHARED_LIBRARY_LIBS = \
44
	$(DIST)/lib/$(LIB_PREFIX)ucvutil_s.$(LIB_SUFFIX) \
44
	$(DIST)/lib/$(LIB_PREFIX)ucvutil_s.$(LIB_SUFFIX) \
45
	$(DIST)/lib/$(LIB_PREFIX)ucvcn_s.$(LIB_SUFFIX) \
46
	$(DIST)/lib/$(LIB_PREFIX)ucvlatin_s.$(LIB_SUFFIX) \
45
	$(DIST)/lib/$(LIB_PREFIX)ucvlatin_s.$(LIB_SUFFIX) \
47
	$(DIST)/lib/$(LIB_PREFIX)ucvibm_s.$(LIB_SUFFIX) \
46
	$(DIST)/lib/$(LIB_PREFIX)ucvibm_s.$(LIB_SUFFIX) \
48
	$(NULL)
47
	$(NULL)
49
48
50
LOCAL_INCLUDES	= -I$(srcdir)/../util \
49
LOCAL_INCLUDES	= -I$(srcdir)/../util \
51
				-I$(srcdir)/../ucvcn \
52
				-I$(srcdir)/../ucvlatin \
50
				-I$(srcdir)/../ucvlatin \
53
				-I$(srcdir)/../ucvibm \
51
				-I$(srcdir)/../ucvibm \
54
				$(NULL)
52
				$(NULL)
(-)xpinstall/packager/packages-mac (-7 / +2 lines)
Line     Link Here 
 Lines 181-193    Link Here 
181
viewer:Components:txmgr.xpt 
181
viewer:Components:txmgr.xpt 
182
viewer:Components:uconv.shlb 
182
viewer:Components:uconv.shlb 
183
viewer:Components:uconv.xpt 
183
viewer:Components:uconv.xpt 
184
viewer:Components:ucvcn.shlb 
184
viewer:Components:ucvwestern.xpt 
185
viewer:Components:ucvibm.shlb 
185
viewer:Components:ucvasia.xpt 
186
viewer:Components:ucvja.shlb 
187
viewer:Components:ucvko.shlb 
188
viewer:Components:ucvlatin.shlb 
189
viewer:Components:ucvtw.shlb 
190
viewer:Components:ucvtw2.shlb 
191
viewer:Components:unicharutil.xpt 
186
viewer:Components:unicharutil.xpt 
192
viewer:Components:uriloader.shlb 
187
viewer:Components:uriloader.shlb 
193
viewer:Components:uriloader.xpt 
188
viewer:Components:uriloader.xpt 
(-)xpinstall/packager/packages-static-unix (-1 lines)
Line     Link Here 
 Lines 102-108    Link Here 
102
bin/components/mozbrwsr.xpt
102
bin/components/mozbrwsr.xpt
103
bin/components/mozcomps.xpt
103
bin/components/mozcomps.xpt
104
bin/components/mozfind.xpt
104
bin/components/mozfind.xpt
105
bin/components/mozucth.xpt
106
bin/components/mozxfer.xpt
105
bin/components/mozxfer.xpt
107
bin/components/necko.xpt
106
bin/components/necko.xpt
108
bin/components/mimetype.xpt
107
bin/components/mimetype.xpt
(-)xpinstall/packager/packages-unix (-7 / +2 lines)
Line     Link Here 
 Lines 149-161    Link Here 
149
bin/components/libtxmgr.so
149
bin/components/libtxmgr.so
150
bin/components/libtxtsvc.so
150
bin/components/libtxtsvc.so
151
bin/components/libuconv.so
151
bin/components/libuconv.so
152
bin/components/libucvcn.so
152
bin/components/libucvwestern.so
153
bin/components/libucvibm.so
153
bin/components/libucvasia.so
154
bin/components/libucvja.so
155
bin/components/libucvko.so
156
bin/components/libucvlatin.so
157
bin/components/libucvtw.so
158
bin/components/libucvtw2.so
159
bin/components/libucvmath.so
154
bin/components/libucvmath.so
160
bin/components/liburiloader.so
155
bin/components/liburiloader.so
161
bin/components/libwebbrwsr.so
156
bin/components/libwebbrwsr.so
(-)xpinstall/packager/packages-win (-7 / +2 lines)
Line     Link Here 
 Lines 204-216    Link Here 
204
bin\components\txtsvc.dll
204
bin\components\txtsvc.dll
205
bin\components\uconv.dll
205
bin\components\uconv.dll
206
bin\components\uconv.xpt
206
bin\components\uconv.xpt
207
bin\components\ucvcn.dll
207
bin\components\ucvasia.dll
208
bin\components\ucvibm.dll
208
bin\components\ucvwest.dll
209
bin\components\ucvja.dll
210
bin\components\ucvko.dll
211
bin\components\ucvlatin.dll
212
bin\components\ucvtw.dll
213
bin\components\ucvtw2.dll
214
bin\components\ucvmath.dll
209
bin\components\ucvmath.dll
215
bin\components\unicharutil.xpt
210
bin\components\unicharutil.xpt
216
bin\components\urildr.dll
211
bin\components\urildr.dll
(-)xpinstall/packager/mac/browser.jst (+7 lines)
Line     Link Here 
 Lines 5-10    Link Here 
5
  deleteThisFile("Components", "DOMDataSource.shlb");
5
  deleteThisFile("Components", "DOMDataSource.shlb");
6
  deleteThisFile("Components", "PSMGlue.shlb");
6
  deleteThisFile("Components", "PSMGlue.shlb");
7
  deleteThisFile("Components", "ucth.shlb");
7
  deleteThisFile("Components", "ucth.shlb");
8
  deleteThisFile("Components", "ucvja.shlb");
9
  deleteThisFile("Components", "ucvko.shlb");
10
  deleteThisFile("Components", "ucvtw.shlb");
11
  deleteThisFile("Components", "ucvtw2.shlb");
12
  deleteThisFile("Components", "ucvlatin.shlb");
13
  deleteThisFile("Components", "ucvcn.shlb");
14
  deleteThisFile("Components", "ucvibm.shlb");
8
  deleteThisFile("Program",    "defaults/pref/config.js");
15
  deleteThisFile("Program",    "defaults/pref/config.js");
9
  deleteThisFile("Program",    "defaults/pref/initpref.js");
16
  deleteThisFile("Program",    "defaults/pref/initpref.js");
10
  deleteThisFile("Program",    "defaults/pref/macxprefs.js");
17
  deleteThisFile("Program",    "defaults/pref/macxprefs.js");
(-)xpinstall/packager/unix/browser.jst (+7 lines)
Line     Link Here 
 Lines 6-11    Link Here 
6
  deleteThisFile("Components", "libpsmglue.so");
6
  deleteThisFile("Components", "libpsmglue.so");
7
  deleteThisFile("Components", "libsample.so");
7
  deleteThisFile("Components", "libsample.so");
8
  deleteThisFile("Components", "nsSample.js");
8
  deleteThisFile("Components", "nsSample.js");
9
  deleteThisFile("Components", "libucvja.so");
10
  deleteThisFile("Components", "libucvko.so");
11
  deleteThisFile("Components", "libucvtw.so");
12
  deleteThisFile("Components", "libucvtw2.so");
13
  deleteThisFile("Components", "libucvlatin.so");
14
  deleteThisFile("Components", "libucvcn.so");
15
  deleteThisFile("Components", "libucvibm.so");
9
  deleteThisFile("Program",    "defaults/pref/config.js");
16
  deleteThisFile("Program",    "defaults/pref/config.js");
10
  deleteThisFile("Program",    "defaults/pref/initpref.js");
17
  deleteThisFile("Program",    "defaults/pref/initpref.js");
11
  deleteThisFile("Program",    "defaults/wallet/URLFieldSchema.tbl");
18
  deleteThisFile("Program",    "defaults/wallet/URLFieldSchema.tbl");
(-)xpinstall/packager/windows/browser.jst (+7 lines)
Line     Link Here 
 Lines 477-482    Link Here 
477
  deleteThisFile("Components", "evntloop.dll");
477
  deleteThisFile("Components", "evntloop.dll");
478
  deleteThisFile("Components", "nativapp.dll");
478
  deleteThisFile("Components", "nativapp.dll");
479
  deleteThisFile("Components", "universalchardet.dll");
479
  deleteThisFile("Components", "universalchardet.dll");
480
  deleteThisFile("Components", "ucvja.dll");
481
  deleteThisFile("Components", "ucvko.dll");
482
  deleteThisFile("Components", "ucvtw.dll");
483
  deleteThisFile("Components", "ucvtw2.dll");
484
  deleteThisFile("Components", "ucvlatin.dll");
485
  deleteThisFile("Components", "ucvcn.dll");
486
  deleteThisFile("Components", "ucvibm.dll");
480
  deleteThisFile("Chrome",     "chrome.rdf");
487
  deleteThisFile("Chrome",     "chrome.rdf");
481
  deleteThisFolder("Chrome",   "overlayinfo");
488
  deleteThisFolder("Chrome",   "overlayinfo");
482
}
489
}

Return to bug 157993