Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Enumerations | Functions | Variables
nsCaseConversionImp2.cpp File Reference
#include "pratom.h"
#include "nsUUDll.h"
#include "nsCaseConversionImp2.h"
#include "casetable.h"

Go to the source code of this file.

Classes

class  nsCompressedMap

Defines

#define IS_ASCII(u)   ( 0x0000 == ((u) & 0xFF80))
#define IS_ASCII_UPPER(u)   ((0x0041 <= (u)) && ( (u) <= 0x005a))
#define IS_ASCII_LOWER(u)   ((0x0061 <= (u)) && ( (u) <= 0x007a))
#define IS_ASCII_ALPHA(u)   (IS_ASCII_UPPER(u) || IS_ASCII_LOWER(u))
#define IS_ASCII_SPACE(u)   ( 0x0020 == (u) )
#define IS_NOCASE_CHAR(u)   (0==(1&(gCaseBlocks[(u)>>13]>>(0x001F&((u)>>8)))))
#define CASE_MAP_CACHE_SIZE   0x40
#define CASE_MAP_CACHE_MASK   0x3F

Enumerations

enum  { kUpperIdx = 0, kTitleIdx }
enum  { kLowIdx = 0, kSizeEveryIdx, kDiffIdx }

Functions

static PRUnichar FastToLower (PRUnichar aChar)
nsresult NS_NewCaseConversion (nsISupports **oResult)

Variables

static nsCompressedMapgUpperMap = nsnull
static nsCompressedMapgLowerMap = nsnull

Define Documentation

Definition at line 69 of file nsCaseConversionImp2.cpp.

Definition at line 68 of file nsCaseConversionImp2.cpp.

#define IS_ASCII (   u)    ( 0x0000 == ((u) & 0xFF80))

Definition at line 57 of file nsCaseConversionImp2.cpp.

Definition at line 60 of file nsCaseConversionImp2.cpp.

#define IS_ASCII_LOWER (   u)    ((0x0061 <= (u)) && ( (u) <= 0x007a))

Definition at line 59 of file nsCaseConversionImp2.cpp.

#define IS_ASCII_SPACE (   u)    ( 0x0020 == (u) )

Definition at line 61 of file nsCaseConversionImp2.cpp.

#define IS_ASCII_UPPER (   u)    ((0x0041 <= (u)) && ( (u) <= 0x005a))

Definition at line 58 of file nsCaseConversionImp2.cpp.

#define IS_NOCASE_CHAR (   u)    (0==(1&(gCaseBlocks[(u)>>13]>>(0x001F&((u)>>8)))))

Definition at line 63 of file nsCaseConversionImp2.cpp.


Enumeration Type Documentation

anonymous enum
Enumerator:
kUpperIdx 
kTitleIdx 

Definition at line 45 of file nsCaseConversionImp2.cpp.

     {
  kUpperIdx =0,
  kTitleIdx
};
anonymous enum
Enumerator:
kLowIdx 
kSizeEveryIdx 
kDiffIdx 

Definition at line 51 of file nsCaseConversionImp2.cpp.


Function Documentation

static PRUnichar FastToLower ( PRUnichar  aChar) [static]

Definition at line 206 of file nsCaseConversionImp2.cpp.

{
  if( IS_ASCII(aChar)) // optimize for ASCII
  {
     if(IS_ASCII_UPPER(aChar))
        return aChar + 0x0020;
     else
        return aChar;
  } 
  else if( IS_NOCASE_CHAR(aChar)) // optimize for block which have no case
  {
    return aChar;
  } 
  else
  {
    return gLowerMap->Map(aChar);
  } 
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult NS_NewCaseConversion ( nsISupports **  oResult)

Definition at line 410 of file nsCaseConversionImp2.cpp.

Here is the call graph for this function:


Variable Documentation

Definition at line 181 of file nsCaseConversionImp2.cpp.

Definition at line 180 of file nsCaseConversionImp2.cpp.