Class Hierarchy   Class Index   Method Index  

CHMunicode.h

00001 //---------------------------------------------------------------------------
00002 // Module: CHMunicode
00003 //
00004 // Description:
00005 //
00006 // This file is used to define a set of macros to provide Unicode
00007 // portability.
00008 //
00009 //---------------------------------------------------------------------------
00010 
00011 #ifndef __CHM_UNICODE__
00012 #define __CHM_UNICODE__
00013 
00014    #define CHMchar char
00015    #define CHM_TEXT(x) x
00016 
00017 #if defined(WIN32) && defined(CHM_64)
00018    #define CHMengineLoadT CHMengineLoad 
00019    #define CHMengineParseMessage CHMengineParseMessageA
00020    #define CHMengineMessageNameT CHMengineMessageName
00021    #define CHMengineSetLogCallBackT CHMengineSetLogCallBack
00022    #define CHMengineTransformMessageT CHMengineTransformMessage
00023    #define CHMengineGenerateMessageT  CHMengineGenerateMessage
00024    #define CHMtableSetString CHMtableSetStringA
00025    #define CHMtableGetString CHMtableGetStringA
00026    #define CHMtableNameT CHMtableName
00027    #define CHMtableColumnIndexT CHMtableColumnIndex
00028    #define CHMtableColumnNameT CHMtableColumnName
00029    #define CHMtableDumpT CHMtableDump
00030    #define CHMtableFreeBufferT CHMtableFreeBuffer
00031    #define CHMerrorGetDescriptionT CHMerrorGetDescription
00032    #define CHMengineDumpT       CHMengineDump
00033    #define CHMengineFreeBufferT CHMengineFreeBuffer
00034 #else
00035    #define _CHMengineLoadT _CHMengineLoad 
00036    #define _CHMengineParseMessage _CHMengineParseMessageA
00037    #define _CHMengineMessageNameT _CHMengineMessageName
00038    #define _CHMengineSetLogCallBackT _CHMengineSetLogCallBack
00039    #define _CHMengineTransformMessageT _CHMengineTransformMessage
00040    #define _CHMengineGenerateMessageT  _CHMengineGenerateMessage
00041    #define _CHMtableSetString _CHMtableSetStringA
00042    #define _CHMtableGetString _CHMtableGetStringA
00043    #define _CHMtableNameT _CHMtableName
00044    #define _CHMtableColumnIndexT _CHMtableColumnIndex
00045    #define _CHMtableColumnNameT _CHMtableColumnName
00046    #define _CHMtableDumpT _CHMtableDump
00047    #define _CHMtableFreeBufferT _CHMtableFreeBuffer
00048    #define _CHMerrorGetDescriptionT _CHMerrorGetDescription
00049    #define _CHMengineDumpT       _CHMengineDump
00050    #define _CHMengineFreeBufferT _CHMengineFreeBuffer
00051 #endif
00052 
00053    #define CHMstrcpy strcpy
00054    #define CHMstrncpy  strncpy
00055    #define CHMstrnset _strnset
00056    #define CHMstrlen   strlen
00057    #define CHMstrcmp   strcmp
00058    #define CHMstrncmp  strncmp
00059    #define CHMstricmp _stricmp
00060    #define CHMstribrk _strpbrk
00061    #define CHMstrchr   strchr
00062    #define CHMstrspn   strspn
00063    #if defined(__BORLANDC__) || defined(CHM_UNIX)
00064       #define CHMstrdup strdup
00065       #define _strdup strdup
00066       #define CHMstrlwr strlwr
00067       #define CHMstrupr strupr
00068    #else
00069       #define CHMstrlwr  _strlwr
00070       #define CHMstrdup   _strdup
00071       #define CHMstrupr  _strupr
00072    #endif
00073    #define CHMstrstr   strstr
00074    #define CHMaccess   _access
00075    #define CHMfopen    fopen
00076    #define CHMatoi     atoi
00077    #define CHMstrtod   strtod
00078    #define CHMstrpbrk  strpbrk
00079    #define CHMfprintf  fprintf
00080    #define CHMsprintf  sprintf
00081    #define CHMprintf   printf 
00082    #define CHMstrtol   strtol
00083    #define CHMmain main
00084 
00085 #define CHM_CHAR_SIZE sizeof(CHMchar)
00086 #endif // end of defensive include