⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chnconv_opt.h

📁 This software performs code conversion of Chinese characters, including GB2312/GBK and BIG5. It a
💻 H
字号:
// rtfconv_opt.h

#ifndef CHNCONV_OPT_H
#define CHNCONV_OPT_H


#ifndef CHNCONV_OPT_GLOBAL
#define CHNCONV_OPT_GLOBAL(type,name)              extern type name
#endif

#ifndef CHNCONV_OPT_GLOBAL_INIT
#define CHNCONV_OPT_GLOBAL_INIT(type,name,init)    extern type name
#endif

#ifndef CHNCONV_OPT_GLOBAL_ARRAY
#define CHNCONV_OPT_GLOBAL_ARRAY(type,name,size)   extern type name []
#endif



// 僶僢僼傽偺挿偝
#define SHORTSTRING_MAX             0x80
#define MESSAGE_BUFFER_SIZE         ( MAX_PATH * 2 )
#define OPTION_FILE_LINE_BUFFER     ( ( MAX_PATH * 4 ) + 0x40 )



#if defined CHNCONV_EXE
// 儐乕僓僀儞僞乕僼僃僀僗尵岅偺僼傽僀儖柤
#define MUILANG_PREFIX_A          "chnc_"
#define MUILANG_PREFIX_W         L"chnc_"
#endif



#if defined CHNCONV_EXE
// 僐乕僪儁乕僕偺慖戰
typedef struct {
   int nCodePage ;
   int nNameId ;
} CODEPAGE ;

extern const CODEPAGE AvailableCodeList [] ;
extern const int AVAILABLE_CODE_LIST_NELEM ;
#endif



#if defined CHNCONV_COM
// 僐儅儞僪儔僀儞斉偺曄悢
CHNCONV_OPT_GLOBAL ( int, IsConvertTxt ) ;
CHNCONV_OPT_GLOBAL ( int, IsConvertRtf ) ;
#endif

#if defined CHNCONV_EXE
// 僟僀傾儘僌斉梡偺曄悢
CHNCONV_OPT_GLOBAL_INIT ( int, nSrcType, TYPE_PSEUDO ) ;
CHNCONV_OPT_GLOBAL_INIT ( int, nDstType, TYPE_GB ) ;
CHNCONV_OPT_GLOBAL ( int, nSrcCode ) ; // 攝楍 AvailableCodeList 偺斣崋傪帵偡
CHNCONV_OPT_GLOBAL ( int, nDstCode ) ;
CHNCONV_OPT_GLOBAL_INIT ( const char *, szDefaultGbFont,          DEFAULT_GB_FONT ) ;
CHNCONV_OPT_GLOBAL_INIT ( const char *, szDefaultBig5Font,        DEFAULT_BIG5_FONT ) ;
CHNCONV_OPT_GLOBAL_INIT ( const char *, szDefaultGbGothicFont,    DEFAULT_GB_GOTHIC_FONT ) ;
CHNCONV_OPT_GLOBAL_INIT ( const char *, szDefaultBig5GothicFont,  DEFAULT_BIG5_GOTHIC_FONT ) ;
CHNCONV_OPT_GLOBAL_INIT ( const char *, const szDefaultPinyinFont,         DEFAULT_PINYIN_FONT ) ;
CHNCONV_OPT_GLOBAL_INIT ( const char *, const szDefaultPinyinGothicFont,   DEFAULT_PINYIN_GOTHIC_FONT ) ;
#endif

#if defined SETUP_C
// 僙僢僩傾僢僾斉梡偺曄悢
CHNCONV_OPT_GLOBAL_ARRAY ( char, szInstallFolderA, MAX_PATH ) ;
CHNCONV_OPT_GLOBAL_ARRAY ( wchar_t, szInstallFolderW, MAX_PATH ) ;
#endif



// 僆僾僔儑儞僼傽僀儖
#define CFG_FILENAME_A      "chnconv.cfg"
#define CFG_FILENAME_W     L"chnconv.cfg"
CHNCONV_OPT_GLOBAL ( const char *, szConfigFileNameA ) ;
CHNCONV_OPT_GLOBAL ( const wchar_t *, szConfigFileNameW ) ;
#if defined CHNCONV_EXE || defined SETUP_C
CHNCONV_OPT_GLOBAL ( int, IsOptionChanged ) ;      // 僆僾僔儑儞傪曄峏偟偨
CHNCONV_OPT_GLOBAL ( int, IsOptionReadOnly ) ;
CHNCONV_OPT_GLOBAL ( int, IsSavePath ) ;
CHNCONV_OPT_GLOBAL ( int, IsSaveCode ) ;
CHNCONV_OPT_GLOBAL ( int, IsSaveWindow ) ;
CHNCONV_OPT_GLOBAL ( int, IsIgnoreSaveWindow ) ;
#endif



// 惍悢偺僆僾僔儑儞
CHNCONV_OPT_GLOBAL ( int, IsGb2big5N ) ;
CHNCONV_OPT_GLOBAL ( int, IsBig52gbN ) ;
CHNCONV_OPT_GLOBAL ( int, IsGb2cwN ) ;
CHNCONV_OPT_GLOBAL ( int, IsSenceCwFanti ) ;
CHNCONV_OPT_GLOBAL ( int, IsCwTxtFanti ) ;
CHNCONV_OPT_GLOBAL ( int, IsOutputNumber ) ;
CHNCONV_OPT_GLOBAL ( int, IsInputNumber ) ;
CHNCONV_OPT_GLOBAL ( int, IsOneQuestionMark ) ;
CHNCONV_OPT_GLOBAL ( int, IsConvertQuotation ) ;
CHNCONV_OPT_GLOBAL_INIT ( int, IsUseSameFont, 1 ) ;
CHNCONV_OPT_GLOBAL ( int, IsOutputCwNewFont ) ;
CHNCONV_OPT_GLOBAL ( int, IsTxtUnicodeHtml ) ;
CHNCONV_OPT_GLOBAL ( int, IsNoUseUnicode ) ;
CHNCONV_OPT_GLOBAL ( int, IsConvertCjkEx ) ;
CHNCONV_OPT_GLOBAL ( int, IsLinshiDaimaToCjkEx ) ;
CHNCONV_OPT_GLOBAL ( int, IsCjkExToLinshiDaima ) ;
CHNCONV_OPT_GLOBAL_INIT ( int, nTmFontSize, DEFAULT_FONT_SIZE ) ;
CHNCONV_OPT_GLOBAL ( int, IsWriteTmComment ) ;
#if defined CHNCONV_EXE || defined SETUP_C
CHNCONV_OPT_GLOBAL ( int, IsNoConfirm ) ;
CHNCONV_OPT_GLOBAL ( int, IsNoRecycle ) ;
CHNCONV_OPT_GLOBAL ( int, IsNoMessage ) ;
CHNCONV_OPT_GLOBAL ( int, IsNoAddExtension ) ;
CHNCONV_OPT_GLOBAL ( int, IsConfirmOnExit ) ;
CHNCONV_OPT_GLOBAL ( int, nSavedMuiLangId ) ;
CHNCONV_OPT_GLOBAL_INIT ( int, nSavedSrcType, -1 ) ;
CHNCONV_OPT_GLOBAL_INIT ( int, nSavedDstType, -1 ) ;
CHNCONV_OPT_GLOBAL_INIT ( int, nSavedSrcCode, -1 ) ;
CHNCONV_OPT_GLOBAL_INIT ( int, nSavedDstCode, -1 ) ;
CHNCONV_OPT_GLOBAL ( int, nSavedWindowX ) ;
CHNCONV_OPT_GLOBAL ( int, nSavedWindowY ) ;
#endif

// 暥帤楍偺僆僾僔儑儞
CHNCONV_OPT_GLOBAL_ARRAY ( char, szGbFont, FONTNAME_MAX ) ;
CHNCONV_OPT_GLOBAL_ARRAY ( char, szGbGothicFont, FONTNAME_MAX ) ;
CHNCONV_OPT_GLOBAL_ARRAY ( char, szBig5Font, FONTNAME_MAX ) ;
CHNCONV_OPT_GLOBAL_ARRAY ( char, szBig5GothicFont, FONTNAME_MAX ) ;
CHNCONV_OPT_GLOBAL_ARRAY ( char, szPinyinFont, FONTNAME_MAX ) ;
CHNCONV_OPT_GLOBAL_ARRAY ( char, szPinyinGothicFont, FONTNAME_MAX ) ;
#if defined CHNCONV_EXE || defined SETUP_C
CHNCONV_OPT_GLOBAL_ARRAY ( char, szBrowsePathA, MAX_PATH ) ;
CHNCONV_OPT_GLOBAL_ARRAY ( wchar_t, szBrowsePathW, MAX_PATH ) ;
#endif



// 僆僾僔儑儞僼傽僀儖偺撉傒庢傝



typedef struct {
   int *nValue ;
   const char *szName ;
} OPTION_INTEGER ;

extern const OPTION_INTEGER OptionIntegerList [] ;
extern const int OPTION_INTEGER_LIST_NELEM ;


typedef struct {
   char *szValue ;
   const char *szName ;
   int nMaxSize ;
} OPTION_STRING_A ;


extern const OPTION_STRING_A OptionStringListA [] ;
extern const int OPTION_STRING_LIST_A_NELEM ;


typedef struct {
   wchar_t *szValue ;
   const char *szName ;
   int nMaxSize ;
} OPTION_STRING_W ;

extern const OPTION_STRING_W OptionStringListW [] ;
extern const int OPTION_STRING_LIST_W_NELEM ;


typedef struct {
   unsigned short *pValue ;
   const char *szName ;
   int nSize ;
} OPTION_BINARY ;

extern const OPTION_BINARY OptionBinaryList ;
extern const int OPTION_BINARY_LIST_NELEM ;



// 僆僾僔儑儞偺東栿
unsigned long TranslateConversionMode ( int nSrcCodePage, int nDstCodePage ) ;
unsigned long TranslateAdditionalMode ( int nSrcCodePage, int nDstCodePage ) ;



#endif


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -