Replace macro __GOLD_SPELL__ with GCFG_NOSPELLDLL; DLL-speller allowed only for Win32; external cpellcheck program is disabled if DLL-speller is enabled

This commit is contained in:
Stas Degteff 2006-01-21 00:57:09 +00:00
parent 348b78be9d
commit 6854113d84
29 changed files with 108 additions and 57 deletions

View File

@ -1,3 +1,6 @@
#
# Defines to exclude some code from Golded+ binary.
#
# Uncomment to disable AdeptXBBS support # Uncomment to disable AdeptXBBS support
#CPPFLAGS+=-DGCFG_NOXBBS #CPPFLAGS+=-DGCFG_NOXBBS
# Uncomment to disable CrashMail support # Uncomment to disable CrashMail support
@ -72,5 +75,5 @@
#CPPFLAGS+=-DGCFG_NOXMAIL #CPPFLAGS+=-DGCFG_NOXMAIL
# Uncomment to disable Synchronet BBS support # Uncomment to disable Synchronet BBS support
#CPPFLAGS+=-DGCFG_NOSYNCHRONET #CPPFLAGS+=-DGCFG_NOSYNCHRONET
# Uncomment to enable MS Office spellchecker support (win32 only) # Uncomment to disable MS Office spellchecker support (win32 only)
#CPPFLAGS+=-D__GOLD_SPELL__ CPPFLAGS+=-DGCFG_NOSPELLDLL

View File

@ -545,7 +545,9 @@ GoldedCfgEdit::GoldedCfgEdit() {
str.push_back(""); cfg.external = str.size()-1; str.push_back(""); cfg.external = str.size()-1;
str.push_back(GOLDED_MSG); cfg.file = str.size()-1; str.push_back(GOLDED_MSG); cfg.file = str.size()-1;
str.push_back("<<"); cfg.hardline = str.size()-1; str.push_back("<<"); cfg.hardline = str.size()-1;
#if defined(GCFG_NOSPELLDLL)
str.push_back(""); cfg.spellchecker = str.size()-1; str.push_back(""); cfg.spellchecker = str.size()-1;
#endif
} }
@ -767,7 +769,7 @@ CfgGed::CfgGed() {
replylinkfloat = true; replylinkfloat = true;
replylinklist = 0; replylinklist = 0;
replylinkshowalways = true; replylinkshowalways = true;
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
scheckerdeflang = 0xFFFF; scheckerdeflang = 0xFFFF;
scheckerenabled = NO; scheckerenabled = NO;
strcpy(scheckeruserdic, "user.dic"); strcpy(scheckeruserdic, "user.dic");

View File

@ -167,7 +167,9 @@ const word CRC_EDITREPLYRE = 0x5D23;
const word CRC_EDITSAVEMENU = 0x7BC2; const word CRC_EDITSAVEMENU = 0x7BC2;
const word CRC_EDITSAVEUTIL = 0xF411; const word CRC_EDITSAVEUTIL = 0xF411;
const word CRC_EDITSOFTCRXLAT = 0xA49A; const word CRC_EDITSOFTCRXLAT = 0xA49A;
#if defined(GCFG_NOSPELLDLL)
const word CRC_EDITSPELLCHECK = 0xE167; const word CRC_EDITSPELLCHECK = 0xE167;
#endif
const word CRC_EDITUNDELETE = 0x4C34; const word CRC_EDITUNDELETE = 0x4C34;
const word CRC_EMPTYTEARLINE = 0x8D0A; const word CRC_EMPTYTEARLINE = 0x8D0A;
const word CRC_ENCODEEMAILHEADERS=0xA843; const word CRC_ENCODEEMAILHEADERS=0xA843;
@ -320,7 +322,7 @@ const word CRC_REPLYLINKFLOAT = 0xA3EC;
const word CRC_REPLYLINKLIST = 0x104F; const word CRC_REPLYLINKLIST = 0x104F;
const word CRC_REPLYLINKSHOWALWAYS = 0x2BCD; const word CRC_REPLYLINKSHOWALWAYS = 0x2BCD;
const word CRC_ROBOTNAME = 0x7393; const word CRC_ROBOTNAME = 0x7393;
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
const word CRC_SCHECKERDEFLANG = 0xBBEB; const word CRC_SCHECKERDEFLANG = 0xBBEB;
const word CRC_SCHECKERENABLED = 0x7394; const word CRC_SCHECKERENABLED = 0x7394;
const word CRC_SCHECKERUSERDIC = 0x0753; const word CRC_SCHECKERUSERDIC = 0x0753;

View File

@ -321,7 +321,9 @@ SwitchE:
case CRC_EDITSAVEMENU : CfgEditsavemenu (); break; case CRC_EDITSAVEMENU : CfgEditsavemenu (); break;
case CRC_EDITSAVEUTIL : CfgEditsaveutil (); break; case CRC_EDITSAVEUTIL : CfgEditsaveutil (); break;
case CRC_EDITSOFTCRXLAT : CfgEditsoftcrxlat (); break; case CRC_EDITSOFTCRXLAT : CfgEditsoftcrxlat (); break;
#if defined(GCFG_NOSPELLDLL)
case CRC_EDITSPELLCHECK : CfgEditspellcheck (); break; case CRC_EDITSPELLCHECK : CfgEditspellcheck (); break;
#endif
case CRC_EDITUNDELETE : CfgEditundelete (); break; case CRC_EDITUNDELETE : CfgEditundelete (); break;
case CRC_ENDGROUP : CfgEndgroup (); break; case CRC_ENDGROUP : CfgEndgroup (); break;
case CRC_ENCODEEMAILHEADERS: CfgEncodeemailheaders(); break; case CRC_ENCODEEMAILHEADERS: CfgEncodeemailheaders(); break;
@ -520,7 +522,7 @@ SwitchR:
SwitchS: SwitchS:
switch(crc) { switch(crc) {
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
case CRC_SCHECKERDEFLANG : CfgScheckerdeflang (); break; case CRC_SCHECKERDEFLANG : CfgScheckerdeflang (); break;
case CRC_SCHECKERENABLED : CfgScheckerenabled (); break; case CRC_SCHECKERENABLED : CfgScheckerenabled (); break;
case CRC_SCHECKERUSERDIC : CfgScheckeruserdic (); break; case CRC_SCHECKERUSERDIC : CfgScheckeruserdic (); break;

View File

@ -312,11 +312,12 @@ void CfgEditsoftcrxlat() {
// ------------------------------------------------------------------ // ------------------------------------------------------------------
#if defined(GCFG_NOSPELLDLL)
void CfgEditspellcheck() { void CfgEditspellcheck() {
EDIT->SpellChecker(val); EDIT->SpellChecker(val);
} }
#endif
// ------------------------------------------------------------------ // ------------------------------------------------------------------
void CfgEditundelete() { void CfgEditundelete() {
@ -325,7 +326,7 @@ void CfgEditundelete() {
} }
// ------------------------------------------------------------------ // ------------------------------------------------------------------
void CfgEncodeemailheaders() { void CfgEncodeemailheaders() {
CFG->encodeemailheaders = make_bool(GetYesno(val)); CFG->encodeemailheaders = make_bool(GetYesno(val));

View File

@ -222,7 +222,7 @@ void CfgRobotname() {
// ------------------------------------------------------------------ // ------------------------------------------------------------------
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
void CfgScheckerdeflang() void CfgScheckerdeflang()
{ {
CFG->scheckerdeflang = atoi(val); CFG->scheckerdeflang = atoi(val);
@ -425,7 +425,7 @@ void CfgSeqOutRun() {
if(*p == '\0') if(*p == '\0')
{ {
CFG->seqoutrun = s; CFG->seqoutrun = s;
if (veryverbose) if (veryverbose)
STD_PRINTNL(" SeqOutRun: \'" << val << "\' --> " << CFG->seqoutrun); STD_PRINTNL(" SeqOutRun: \'" << val << "\' --> " << CFG->seqoutrun);
@ -454,7 +454,7 @@ void CfgSeqOutRun() {
return; return;
} }
CFG->seqoutrun = s; CFG->seqoutrun = s;
if (veryverbose) if (veryverbose)
STD_PRINTNL(" SeqOutRun: \'" << val << "\' --> " << CFG->seqoutrun); STD_PRINTNL(" SeqOutRun: \'" << val << "\' --> " << CFG->seqoutrun);
} }

View File

@ -119,7 +119,9 @@ CmdKey DefaultKeyset[] = {
{ Key_A_S , KK_EditSaveMsg , KT_E }, { Key_A_S , KK_EditSaveMsg , KT_E },
{ Key_C_Z , KK_EditSaveMsg , KT_E }, { Key_C_Z , KK_EditSaveMsg , KT_E },
{ Key_F2 , KK_EditSaveMsg , KT_E }, { Key_F2 , KK_EditSaveMsg , KT_E },
#if defined(GCFG_NOSPELLDLL)
{ Key_F9 , KK_EditSpellCheck , KT_E }, { Key_F9 , KK_EditSpellCheck , KT_E },
#endif
{ Key_Tab , KK_EditTab , KT_E }, { Key_Tab , KK_EditTab , KT_E },
{ Key_S_Tab , KK_EditTabReverse , KT_E }, { Key_S_Tab , KK_EditTabReverse , KT_E },
{ Key_A_3 , KK_EditToggleCase , KT_E }, { Key_A_3 , KK_EditToggleCase , KT_E },
@ -675,7 +677,7 @@ tglobalkey globalkeys[] = {
{ CRC_READSHOWDEL , KK_ReadShowDel , KT_R }, // 0x8615 { CRC_READSHOWDEL , KK_ReadShowDel , KT_R }, // 0x8615
{ CRC_K_ENTER , Key_Ent , 0 }, // 0x87BD { CRC_K_ENTER , Key_Ent , 0 }, // 0x87BD
{ CRC_EDITGOTOPLINE , KK_EditGoTopLine , KT_E }, // 0x87C2 { CRC_EDITGOTOPLINE , KK_EditGoTopLine , KT_E }, // 0x87C2
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
{ CRC_EDITSCHECKERMENU , KK_EditSCheckerMenu , KT_E }, // 0x881F { CRC_EDITSCHECKERMENU , KK_EditSCheckerMenu , KT_E }, // 0x881F
#endif #endif
{ CRC_HEADERTOGGLEARCSENT , KK_HeaderToggleArcsent , KT_H }, // 0x88A7 { CRC_HEADERTOGGLEARCSENT , KK_HeaderToggleArcsent , KT_H }, // 0x88A7
@ -824,7 +826,9 @@ tglobalkey globalkeys[] = {
{ CRC_EDITBLOCKUP , KK_EditBlockUp , KT_E }, // 0xE004 { CRC_EDITBLOCKUP , KK_EditBlockUp , KT_E }, // 0xE004
{ CRC_EDITGOBEGLINE , KK_EditGoBegLine , KT_E }, // 0xE045 { CRC_EDITGOBEGLINE , KK_EditGoBegLine , KT_E }, // 0xE045
{ CRC_READGOTONEXTMSG , KK_ReadGotoNextMsg , KT_R }, // 0xE0F1 { CRC_READGOTONEXTMSG , KK_ReadGotoNextMsg , KT_R }, // 0xE0F1
#if defined(GCFG_NOSPELLDLL)
{ CRC_EDITSPELLCHECK , KK_EditSpellCheck , KT_E }, // 0xE167 { CRC_EDITSPELLCHECK , KK_EditSpellCheck , KT_E }, // 0xE167
#endif
{ CRC_AREASCAN , KK_AreaScan , KT_A }, // 0xE440 { CRC_AREASCAN , KK_AreaScan , KT_A }, // 0xE440
{ CRC_EDITGOWORDLEFT , KK_EditGoWordLeft , KT_E }, // 0xE48C { CRC_EDITGOWORDLEFT , KK_EditGoWordLeft , KT_E }, // 0xE48C
{ CRC_EDITSCODENORMAL , KK_EditSCodeNormal , KT_E }, // 0xE4CE { CRC_EDITSCODENORMAL , KK_EditSCodeNormal , KT_E }, // 0xE4CE

View File

@ -113,7 +113,7 @@ const word CRC_EDITQUITNOW = 0x80BA;
const word CRC_EDITREFLOW = 0x13F9; const word CRC_EDITREFLOW = 0x13F9;
const word CRC_EDITSAVEFILE = 0x64A4; const word CRC_EDITSAVEFILE = 0x64A4;
const word CRC_EDITSAVEMSG = 0x660C; const word CRC_EDITSAVEMSG = 0x660C;
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
const word CRC_EDITSCHECKERMENU = 0x881F; const word CRC_EDITSCHECKERMENU = 0x881F;
#endif #endif
const word CRC_EDITSCODENORMAL = 0xE4CE; const word CRC_EDITSCODENORMAL = 0xE4CE;
@ -122,7 +122,9 @@ const word CRC_EDITSCODEITALIC = 0x487F;
const word CRC_EDITSCODEUNDERLINE = 0xB1D9; const word CRC_EDITSCODEUNDERLINE = 0xB1D9;
const word CRC_EDITSCODEREVERSE = 0xFC0E; const word CRC_EDITSCODEREVERSE = 0xFC0E;
const word CRC_EDITSOUNDKILL = 0xA9A7; const word CRC_EDITSOUNDKILL = 0xA9A7;
#if defined(GCFG_NOSPELLDLL)
const word CRC_EDITSPELLCHECK = 0xE167; const word CRC_EDITSPELLCHECK = 0xE167;
#endif
const word CRC_EDITTAB = 0x8C26; const word CRC_EDITTAB = 0x8C26;
const word CRC_EDITTABREVERSE = 0xF5B6; const word CRC_EDITTABREVERSE = 0xF5B6;
const word CRC_EDITTOGGLECASE = 0xC282; const word CRC_EDITTOGGLECASE = 0xC282;

View File

@ -398,7 +398,9 @@ static LangCrc LangCrcs[] = {
{ CRC_IL_FOUNDPERSONAL , NULL , " Found %u personal mail%s in %u area%s " }, { CRC_IL_FOUNDPERSONAL , NULL , " Found %u personal mail%s in %u area%s " },
{ CRC_IL_NOPERSONAL , NULL , " No personal mail found " }, { CRC_IL_NOPERSONAL , NULL , " No personal mail found " },
{ CRC_ST_ESCORCONTINUE , NULL , "ESC exits. Other keys: Tries to continue" }, { CRC_ST_ESCORCONTINUE , NULL , "ESC exits. Other keys: Tries to continue" },
#if defined(GCFG_NOSPELLDLL)
{ CRC_MS_SPELLCHECKER , NULL , "SpellChecker: %s" }, { CRC_MS_SPELLCHECKER , NULL , "SpellChecker: %s" },
#endif
{ CRC_WT_INS , NULL , " Ins " }, { CRC_WT_INS , NULL , " Ins " },
{ CRC_WT_DRAWSL , NULL , " DL1 " }, { CRC_WT_DRAWSL , NULL , " DL1 " },
{ CRC_WT_DRAWDL , NULL , " DL2 " }, { CRC_WT_DRAWDL , NULL , " DL2 " },

View File

@ -401,7 +401,9 @@ const word CRC_WT_GRP = 0xD2EA;
const word CRC_IL_FOUNDPERSONAL = 0xA039; const word CRC_IL_FOUNDPERSONAL = 0xA039;
const word CRC_IL_NOPERSONAL = 0x2813; const word CRC_IL_NOPERSONAL = 0x2813;
const word CRC_ST_ESCORCONTINUE = 0x4800; const word CRC_ST_ESCORCONTINUE = 0x4800;
#if defined(GCFG_NOSPELLDLL)
const word CRC_MS_SPELLCHECKER = 0x69B4; const word CRC_MS_SPELLCHECKER = 0x69B4;
#endif
const word CRC_WT_INS = 0x2F27; const word CRC_WT_INS = 0x2F27;
const word CRC_WT_DRAWSL = 0x264D; const word CRC_WT_DRAWSL = 0x264D;
const word CRC_WT_DRAWDL = 0x314D; const word CRC_WT_DRAWDL = 0x314D;

View File

@ -225,7 +225,7 @@ const word CRC_STYLECODES = 0x4CB0;
// ------------------------------------------------------------------ // ------------------------------------------------------------------
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
const word CRC_SPELL = 0xB8AE; const word CRC_SPELL = 0xB8AE;
const word CRC_SCERROR = 0xAB65; const word CRC_SCERROR = 0xAB65;
#endif #endif
@ -423,7 +423,7 @@ void GetColors(char* value) {
case CRC_STYLECODES: case CRC_STYLECODES:
wptr = &GC_STYLE_; wptr = &GC_STYLE_;
break; break;
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
case CRC_SPELL: case CRC_SPELL:
wptr = &GC_SPELL_; wptr = &GC_SPELL_;
break; break;
@ -591,7 +591,7 @@ void GetColors(char* value) {
wptr->_ReverseBoldItalicUnderscore = attr; wptr->_ReverseBoldItalicUnderscore = attr;
} }
break; break;
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
case CRC_SCERROR: case CRC_SCERROR:
wptr->_SpellError = attr; wptr->_SpellError = attr;
break; break;

View File

@ -165,7 +165,9 @@ void CfgEditreplyre ();
void CfgEditsavemenu (); void CfgEditsavemenu ();
void CfgEditsaveutil (); void CfgEditsaveutil ();
void CfgEditsoftcrxlat (); void CfgEditsoftcrxlat ();
#if defined(GCFG_NOSPELLDLL)
void CfgEditspellcheck (); void CfgEditspellcheck ();
#endif
void CfgEditundelete (); void CfgEditundelete ();
void CfgEmptytearline (); void CfgEmptytearline ();
void CfgEncodeemailheaders(); void CfgEncodeemailheaders();
@ -306,7 +308,7 @@ void CfgReplylinklist ();
void CfgReplylinkshowalways(); void CfgReplylinkshowalways();
void CfgReplyto (); void CfgReplyto ();
void CfgRobotname (); void CfgRobotname ();
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
void CfgScheckerdeflang (); void CfgScheckerdeflang ();
void CfgScheckerenabled (); void CfgScheckerenabled ();
void CfgScheckeruserdic (); void CfgScheckeruserdic ();

View File

@ -546,7 +546,7 @@ enum {
TAG_MARKQUIT TAG_MARKQUIT
}; };
// ------------------------------------------------------------------ // ------------------------------------------------------------------
// The Message Browser // The Message Browser
@ -638,7 +638,7 @@ struct SaveUtil {
#define GC_CFGB_ CFG->color[11] #define GC_CFGB_ CFG->color[11]
#define GC_STYLE_ CFG->color[12] #define GC_STYLE_ CFG->color[12]
#define GC_SHAD_ CFG->color[13] #define GC_SHAD_ CFG->color[13]
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
#define GC_SPELL_ CFG->color[14] #define GC_SPELL_ CFG->color[14]
#endif #endif
@ -693,7 +693,7 @@ struct SaveUtil {
#define _ReverseItalicUnderscore c[14] #define _ReverseItalicUnderscore c[14]
#define _ReverseBoldItalicUnderscore c[15] #define _ReverseBoldItalicUnderscore c[15]
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
#define _SpellError c[0] #define _SpellError c[0]
#endif #endif
@ -813,7 +813,7 @@ struct SaveUtil {
#define C_STYLERUI_ GC_STYLE_._ReverseItalicUnderscore #define C_STYLERUI_ GC_STYLE_._ReverseItalicUnderscore
#define C_STYLERUIB GC_STYLE_._ReverseBoldItalicUnderscore #define C_STYLERUIB GC_STYLE_._ReverseBoldItalicUnderscore
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
#define C_SCERROR GC_SPELL_._SpellError #define C_SCERROR GC_SPELL_._SpellError
#endif #endif

View File

@ -309,7 +309,7 @@ public:
int replylinklist; int replylinklist;
bool replylinkshowalways; bool replylinkshowalways;
gstrarray robotname; gstrarray robotname;
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
word scheckerdeflang; word scheckerdeflang;
int scheckerenabled; int scheckerenabled;
Path scheckeruserdic; Path scheckeruserdic;
@ -467,7 +467,9 @@ protected:
int external; int external;
int file; int file;
int hardline; int hardline;
#if defined(GCFG_NOSPELLDLL)
int spellchecker; int spellchecker;
#endif
} cfg; } cfg;
// ----------------------------------------------------------------- // -----------------------------------------------------------------
@ -518,7 +520,9 @@ public:
int ReplyRe() { return cfg.replyre; } int ReplyRe() { return cfg.replyre; }
bool SaveMenu() { return cfg.savemenu; } bool SaveMenu() { return cfg.savemenu; }
char SoftCrXlat() { return cfg.softcrxlat; } char SoftCrXlat() { return cfg.softcrxlat; }
#if defined(GCFG_NOSPELLDLL)
const char* SpellChecker() { return str[cfg.spellchecker].c_str(); } const char* SpellChecker() { return str[cfg.spellchecker].c_str(); }
#endif
int UnDelete() { return cfg.undelete; } int UnDelete() { return cfg.undelete; }
// ----------------------------------------------------------------- // -----------------------------------------------------------------
@ -549,7 +553,9 @@ public:
void ReplyRe(int s) { cfg.replyre = s; } void ReplyRe(int s) { cfg.replyre = s; }
void SaveMenu(bool s) { cfg.savemenu = s; } void SaveMenu(bool s) { cfg.savemenu = s; }
void SoftCrXlat(char s) { cfg.softcrxlat = s; } void SoftCrXlat(char s) { cfg.softcrxlat = s; }
#if defined(GCFG_NOSPELLDLL)
void SpellChecker(char* s) { str[cfg.spellchecker] = s; } void SpellChecker(char* s) { str[cfg.spellchecker] = s; }
#endif
void UnDelete(int s) { cfg.undelete = s; } void UnDelete(int s) { cfg.undelete = s; }
}; };

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 767 B

View File

@ -95,7 +95,7 @@ void IEclass::debugtest(char* __test, int __a, int __b, char* __file, int __line
// ------------------------------------------------------------------ // ------------------------------------------------------------------
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
inline bool isscchar(int c) inline bool isscchar(int c)
{ {
return isxalnum(c) || (c == '-') || (c == '\'') || (c == '.') ; return isxalnum(c) || (c == '-') || (c == '\'') || (c == '.') ;
@ -252,7 +252,7 @@ void IEclass::gotorowcol(uint __col, uint __row) {
// ------------------------------------------------------------------ // ------------------------------------------------------------------
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
void IEclass::dispstringsc(char *__buf, uint __beg, uint __end, uint __row, uint __col, char endchar) void IEclass::dispstringsc(char *__buf, uint __beg, uint __end, uint __row, uint __col, char endchar)
{ {
char scbuf[EDIT_BUFLEN]; char scbuf[EDIT_BUFLEN];
@ -448,7 +448,7 @@ void IEclass::dispstring(Line* line, uint __row)
GFTRK(NULL); GFTRK(NULL);
} }
#else //#if defined(__GOLD_SPELL__) #else // #if !defined(GCFG_NOSPELLDLL)
// ------------------------------------------------------------------ // ------------------------------------------------------------------
@ -564,7 +564,7 @@ void IEclass::dispstring(const char* __string, uint __row, int attr, Line* line)
GFTRK(NULL); GFTRK(NULL);
} }
#endif //#if defined(__GOLD_SPELL__) #endif // #if !defined(GCFG_NOSPELLDLL)
// ------------------------------------------------------------------ // ------------------------------------------------------------------
@ -604,7 +604,7 @@ void IEclass::displine(Line* __line, uint __row) {
// Display line // Display line
setcolor(__line); setcolor(__line);
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
dispstring(__line, __row); dispstring(__line, __row);
#else #else
dispstring(__line->txt.c_str(), __row, -1, __line); dispstring(__line->txt.c_str(), __row, -1, __line);
@ -652,7 +652,7 @@ void IEclass::refresh(Line* __currline, uint __row) {
} }
// If we ran out of lines, blank the rest // If we ran out of lines, blank the rest
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
if (__row <= maxrow) if (__row <= maxrow)
editwin.fill(__row, mincol, __row, maxcol, _box_table(W_BREAD, 1), C_READB|ACSET); editwin.fill(__row, mincol, __row, maxcol, _box_table(W_BREAD, 1), C_READB|ACSET);
if (++__row <= maxrow) if (++__row <= maxrow)
@ -2084,7 +2084,7 @@ void IEclass::SaveMsg() {
// ------------------------------------------------------------------ // ------------------------------------------------------------------
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
void IEclass::SCheckerMenu() void IEclass::SCheckerMenu()
{ {
if (!schecker.IsLoaded()) if (!schecker.IsLoaded())
@ -2783,11 +2783,13 @@ noselecting:
case KK_EditReflow: Reflow(); break; case KK_EditReflow: Reflow(); break;
case KK_EditSaveFile: SaveFile(); break; case KK_EditSaveFile: SaveFile(); break;
case KK_EditSaveMsg: SaveMsg(); break; case KK_EditSaveMsg: SaveMsg(); break;
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
case KK_EditSCheckerMenu: SCheckerMenu(); break; case KK_EditSCheckerMenu: SCheckerMenu(); break;
#endif #endif
case KK_EditSoundkill: Soundkill(); break; case KK_EditSoundkill: Soundkill(); break;
#if defined(GCFG_NOSPELLDLL)
case KK_EditSpellCheck: SpellCheck(); break; case KK_EditSpellCheck: SpellCheck(); break;
#endif
case KK_EditTab: Tab(); break; case KK_EditTab: Tab(); break;
case KK_EditTabReverse: ReTab(); break; case KK_EditTabReverse: ReTab(); break;
case KK_EditToggleCase: ToggleCase(); break; case KK_EditToggleCase: ToggleCase(); break;
@ -2838,7 +2840,7 @@ int IEclass::Start(int __mode, uint* __position, GMsg* __msg) {
msgmode = __mode; msgmode = __mode;
currline = __msg->lin; currline = __msg->lin;
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
if (CFG->scheckerenabled) if (CFG->scheckerenabled)
{ {
schecker.Init(); schecker.Init();

View File

@ -282,9 +282,9 @@ protected:
int selecting; int selecting;
// ---------------------------------------------------------------- // ----------------------------------------------------------------
// Speller. // Speller (DLL)
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
CSpellChecker schecker; CSpellChecker schecker;
#endif #endif
@ -299,7 +299,7 @@ protected:
void dispins (); void dispins ();
void dispdl (); void dispdl ();
void displine (Line* __line, uint __row); void displine (Line* __line, uint __row);
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
void dispstringsc (char *__buf, uint __beg, uint __end, uint __row, uint __col, char endchar); void dispstringsc (char *__buf, uint __beg, uint __end, uint __row, uint __col, char endchar);
void dispstring (Line* line, uint __row); void dispstring (Line* line, uint __row);
#else #else
@ -409,11 +409,14 @@ public:
void ReTab (); void ReTab ();
void SaveFile (); void SaveFile ();
void SaveMsg (); void SaveMsg ();
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
void SCheckerMenu (); void SCheckerMenu ();
#endif #endif
void Soundkill (); void Soundkill ();
#if defined(GCFG_NOSPELLDLL)
// External spell check tool
void SpellCheck (); void SpellCheck ();
#endif
void Tab (); void Tab ();
void ToggleCase (); void ToggleCase ();
void ToggleCaseBlock(gkey key); void ToggleCaseBlock(gkey key);

View File

@ -1311,6 +1311,7 @@ void IEclass::editexport(Line* __exportline, int __endat) {
// ------------------------------------------------------------------ // ------------------------------------------------------------------
#if defined(GCFG_NOSPELLDLL)
void IEclass::SpellCheck() { void IEclass::SpellCheck() {
GFTRK("EditSpellCheck"); GFTRK("EditSpellCheck");
@ -1329,6 +1330,7 @@ void IEclass::SpellCheck() {
GFTRK(NULL); GFTRK(NULL);
} }
#endif
// ------------------------------------------------------------------ // ------------------------------------------------------------------
@ -1805,7 +1807,7 @@ void IEclass::DrawLines(gkey key)
} }
} }
break; break;
case KK_EditGoUp: case KK_EditGoUp:
if (!currline->prev) { lines[2] = 0; gonext = false; } if (!currline->prev) { lines[2] = 0; gonext = false; }
@ -1853,7 +1855,7 @@ void IEclass::DrawLines(gkey key)
Undo->PushItem(EDIT_UNDO_INS_CHAR); Undo->PushItem(EDIT_UNDO_INS_CHAR);
currline->txt.insert(col, 1, new_chr); currline->txt.insert(col, 1, new_chr);
} }
setlinetype(currline); setlinetype(currline);
displine(currline, row); displine(currline, row);
} }

View File

@ -169,7 +169,9 @@ const gkey KK_EditReflow = 0xFEEE;
const gkey KK_EditSaveFile = 0xFEEF; const gkey KK_EditSaveFile = 0xFEEF;
const gkey KK_EditSaveMsg = 0xFEF0; const gkey KK_EditSaveMsg = 0xFEF0;
const gkey KK_EditSoundkill = 0xFEF1; const gkey KK_EditSoundkill = 0xFEF1;
#if defined(GCFG_NOSPELLDLL)
const gkey KK_EditSpellCheck = 0xFEF2; const gkey KK_EditSpellCheck = 0xFEF2;
#endif
const gkey KK_EditTab = 0xFEF3; const gkey KK_EditTab = 0xFEF3;
const gkey KK_EditTabReverse = 0xFEF4; const gkey KK_EditTabReverse = 0xFEF4;
const gkey KK_EditToggleCase = 0xFEF5; const gkey KK_EditToggleCase = 0xFEF5;
@ -196,7 +198,7 @@ const gkey KK_EditSCodeBold = 0xFF09;
const gkey KK_EditSCodeItalic = 0xFF0A; const gkey KK_EditSCodeItalic = 0xFF0A;
const gkey KK_EditSCodeUnderline = 0xFF0B; const gkey KK_EditSCodeUnderline = 0xFF0B;
const gkey KK_EditSCodeReverse = 0xFF0C; const gkey KK_EditSCodeReverse = 0xFF0C;
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
const gkey KK_EditSCheckerMenu = 0xFF0D; const gkey KK_EditSCheckerMenu = 0xFF0D;
#endif #endif
const gkey KK_EditDrawLines = 0xFF0E; const gkey KK_EditDrawLines = 0xFF0E;

View File

@ -385,7 +385,9 @@ struct LangGed {
char* FoundPersonal; // IL_FOUNDPERSONAL char* FoundPersonal; // IL_FOUNDPERSONAL
char* NoPersonal; // IL_NOPERSONAL char* NoPersonal; // IL_NOPERSONAL
char* EscOrContinue; // ST_ESCORCONTINUE char* EscOrContinue; // ST_ESCORCONTINUE
#if defined(GCFG_NOSPELLDLL)
char* SpellChecker; // MS_SPELLCHECKER char* SpellChecker; // MS_SPELLCHECKER
#endif
char* Ins; // WT_INS char* Ins; // WT_INS
char* DrawSL; // WT_DRAWSL char* DrawSL; // WT_DRAWSL
char* DrawDL; // WT_DRAWDL char* DrawDL; // WT_DRAWDL
@ -464,8 +466,8 @@ struct LangGed {
char* ArealistSelections1;// MI_ALSELECTIONS1 char* ArealistSelections1;// MI_ALSELECTIONS1
char* ArealistSelections2;// MI_ALSELECTIONS2 char* ArealistSelections2;// MI_ALSELECTIONS2
char* Decode; // IL_DECODE char* Decode; // IL_DECODE
char* Preparing; // MI_PREPARING char* Preparing; // MI_PREPARING
char* ExternUtil; // WT_EXTERNUTIL char* ExternUtil; // WT_EXTERNUTIL
char* SelectExternUtil; // ST_EXTERNUTIL char* SelectExternUtil; // ST_EXTERNUTIL

View File

@ -44,7 +44,7 @@ void GMnuAsk::AskInit(int __row, int __col, char* __title, int __help) {
// ------------------------------------------------------------------ // ------------------------------------------------------------------
int GMnuYesNo::YesNo(int __row, int __col, char* __title, char* __yes, char* __no, int __help, int __yesno) { int GMnuYesNo::YesNo(int __row, int __col, char* __title, char* __yes, char* __no, int __help, int __yesno) {
enum { TAG_ASKYES=100, TAG_ASKNO }; enum { TAG_ASKYES=100, TAG_ASKNO };
HandleGEvent(EVTT_ASKYESNO); HandleGEvent(EVTT_ASKYESNO);
@ -292,7 +292,7 @@ int GMenuCMF::Run() {
// ------------------------------------------------------------------ // ------------------------------------------------------------------
int GMenuDomarks::Run(char* dowhat) { int GMenuDomarks::Run(char* dowhat) {
enum { TAG_MARKED=100, TAG_CURRENT, TAG_QUIT }; enum { TAG_MARKED=100, TAG_CURRENT, TAG_QUIT };
static int _prevtag = TAG_CURRENT; static int _prevtag = TAG_CURRENT;
@ -414,7 +414,7 @@ int GMenuImportTxt::Run() {
// ------------------------------------------------------------------ // ------------------------------------------------------------------
int GMenuMarkMsgs::Run() { int GMenuMarkMsgs::Run() {
static int _prevtag = TAG_MARKYOURMAIL; static int _prevtag = TAG_MARKYOURMAIL;
update_statusline(LNG->MarkingOptions); update_statusline(LNG->MarkingOptions);
@ -482,7 +482,7 @@ int GMenuEditfile::Run(GMsg* __msg) {
for(;;) { for(;;) {
update_statuslinef(LNG->Quotepct, "ST_QUOTEPCT", __msg->quotepct, __msg->quotepct > 80 ? "!!!" : ""); update_statuslinef(LNG->Quotepct, "ST_QUOTEPCT", __msg->quotepct, __msg->quotepct > 80 ? "!!!" : "");
char _title[80]; char _title[80];
sprintf(_title, LNG->SaveMsg, __msg->lines); sprintf(_title, LNG->SaveMsg, __msg->lines);
AskInit(6, 0, _title, H_SaveMsg); AskInit(6, 0, _title, H_SaveMsg);
@ -953,7 +953,7 @@ int GMenuEditHeader::Run(int mode, GMsg* msg) {
HeaderView->Use(AA, msg); HeaderView->Use(AA, msg);
HeaderView->Paint(); HeaderView->Paint();
if(not gkbd.quitall) { if(not gkbd.quitall) {
switch(_tag) { switch(_tag) {
case W_ESCPRESS: case W_ESCPRESS:
@ -1070,7 +1070,7 @@ int GMenuConfirm::Run() {
// ------------------------------------------------------------------ // ------------------------------------------------------------------
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
int GMenuSChecker::Run(CSpellChecker &schecker, const char *word) int GMenuSChecker::Run(CSpellChecker &schecker, const char *word)
{ {
enum enum
@ -1139,7 +1139,7 @@ int GMenuSChecker::Run(CSpellChecker &schecker, const char *word)
for (idx = 0; idx < langcount; idx++) for (idx = 0; idx < langcount; idx++)
Item(TAG_LANG+idx+1, langstr[idx].c_str()); Item(TAG_LANG+idx+1, langstr[idx].c_str());
End(); End();
} }
@ -1163,7 +1163,7 @@ int GMenuSChecker::Run(CSpellChecker &schecker, const char *word)
{ {
ItemSep(); ItemSep();
Item(TAG_MORE + levels, "M More... ", 0); Item(TAG_MORE + levels, "M More... ", 0);
levels++; levels++;
numrows = levels + 6; numrows = levels + 6;

View File

@ -304,7 +304,7 @@ public:
// ------------------------------------------------------------------ // ------------------------------------------------------------------
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
class GMenuSChecker : public GMnu class GMenuSChecker : public GMnu
{ {
public: public:

View File

@ -117,7 +117,9 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
TPLTOKEN_COMMENT, TPLTOKEN_COMMENT,
TPLTOKEN_QUOTEBUF, TPLTOKEN_QUOTEBUF,
TPLTOKEN_ATTRIB, TPLTOKEN_ATTRIB,
#if defined(GCFG_NOSPELLDLL)
TPLTOKEN_SPELLCHECKER, TPLTOKEN_SPELLCHECKER,
#endif
TPLTOKEN_SETSUBJ, TPLTOKEN_SETSUBJ,
TPLTOKEN_SETFROM, TPLTOKEN_SETFROM,
TPLTOKEN_SETTO, TPLTOKEN_SETTO,
@ -156,7 +158,9 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
{ CSTR_COMMA_SIZEOF_CSTR("comment") }, { CSTR_COMMA_SIZEOF_CSTR("comment") },
{ CSTR_COMMA_SIZEOF_CSTR("quotebuf") }, { CSTR_COMMA_SIZEOF_CSTR("quotebuf") },
{ CSTR_COMMA_SIZEOF_CSTR("attrib") }, { CSTR_COMMA_SIZEOF_CSTR("attrib") },
#if defined(GCFG_NOSPELLDLL)
{ CSTR_COMMA_SIZEOF_CSTR("spellchecker") }, { CSTR_COMMA_SIZEOF_CSTR("spellchecker") },
#endif
{ CSTR_COMMA_SIZEOF_CSTR("setsubj") }, { CSTR_COMMA_SIZEOF_CSTR("setsubj") },
{ CSTR_COMMA_SIZEOF_CSTR("setfrom") }, { CSTR_COMMA_SIZEOF_CSTR("setfrom") },
{ CSTR_COMMA_SIZEOF_CSTR("setto") }, { CSTR_COMMA_SIZEOF_CSTR("setto") },
@ -494,10 +498,12 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
} }
continue; continue;
#if defined(GCFG_NOSPELLDLL)
case TPLTOKEN_SPELLCHECKER: case TPLTOKEN_SPELLCHECKER:
if(mode != MODE_QUOTEBUF) if(mode != MODE_QUOTEBUF)
EDIT->SpellChecker(strskip_wht(ptr)); EDIT->SpellChecker(strskip_wht(ptr));
continue; continue;
#endif
case TPLTOKEN_SETSUBJ: case TPLTOKEN_SETSUBJ:
case TPLTOKEN_FORCESUBJ: case TPLTOKEN_FORCESUBJ:

View File

@ -143,6 +143,7 @@ gutlwinm cpp all bcx cyg
gutlunix cpp all lnx gutlunix cpp all lnx
gutlbeos cpp all be gutlbeos cpp all be
be_lock c all be be_lock c all be
gespell cpp all cyg
## Low-level text video ## Low-level text video
gvidbase cpp all nov bcd bco bcx wcn wco wcx lnx emx djg rsx cyg be gvidbase cpp all nov bcd bco bcx wcn wco wcx lnx emx djg rsx cyg be

View File

@ -101,6 +101,11 @@
#define NL "\n" #define NL "\n"
#endif #endif
/* ------------------------------------------------------------------
// Spellchecker using dynamic library load */
#if !defined(GCFG_NOSPELLDLL) && !defined(__WIN32__)
#undef GCFG_NOSPELLDLL
#endif
/* ------------------------------------------------------------------ /* ------------------------------------------------------------------
// Special character constants */ // Special character constants */

View File

@ -24,7 +24,7 @@
// SpellChecker functions. // SpellChecker functions.
// ------------------------------------------------------------------ // ------------------------------------------------------------------
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
#if defined(_MSC_VER) #if defined(_MSC_VER)
/* C4786: 'identifier' : identifier was truncated to 'number' /* C4786: 'identifier' : identifier was truncated to 'number'
@ -127,7 +127,7 @@ const dword SC_SO_FindExtraSpaces = 0x0080; // CSAPI to flag extra space
const dword SC_SO_FindSpacesBeforePunc = 0x0100; // CSAPI to flag space preceeding certain punc const dword SC_SO_FindSpacesBeforePunc = 0x0100; // CSAPI to flag space preceeding certain punc
const dword SC_SO_FindSpacesAfterPunc = 0x0200; // CSAPI to flag space after certain punc const dword SC_SO_FindSpacesAfterPunc = 0x0200; // CSAPI to flag space after certain punc
const dword SC_SO_RateSuggestions = 0x0400; const dword SC_SO_RateSuggestions = 0x0400;
// All suggestions returned should be given some scaled value // All suggestions returned should be given some scaled value
// corresponding to liklihood of being correct alternative. // corresponding to liklihood of being correct alternative.
// Scale is 1..255, 255 most likely correction and 1 least likely // Scale is 1..255, 255 most likely correction and 1 least likely
const dword SC_SO_FindInitialNumerals = 0x0800; // Flag words starting with number(s) const dword SC_SO_FindInitialNumerals = 0x0800; // Flag words starting with number(s)
@ -139,7 +139,7 @@ const dword SC_SO_UseAllOpenUdr = 0x4000;
// or all opened udr's with mdr's opened after this option is set. // or all opened udr's with mdr's opened after this option is set.
// This option does not allow exclusion dicts to be edited. (HM only) // This option does not allow exclusion dicts to be edited. (HM only)
const dword SC_SO_SwapMdr = 0x8000; const dword SC_SO_SwapMdr = 0x8000;
// Keep the most recent 2 mdr's around. swap between them instead of actually // Keep the most recent 2 mdr's around. swap between them instead of actually
// closing and reopening mdr's. (HM only) // closing and reopening mdr's. (HM only)
const dword SC_SO_SglStepSugg = 0x10000; const dword SC_SO_SglStepSugg = 0x10000;
// Break after each suggestion task for faster return of control to the // Break after each suggestion task for faster return of control to the
@ -466,7 +466,7 @@ CSpellSuggestV &CSpellChecker::Suggest()
{ {
more = true; more = true;
if (!mLang->SpellSuggest(mText, more = true)) if (!mLang->SpellSuggest(mText, more = true))
return mSuggest; return mSuggest;
else else
{ {
@ -494,6 +494,6 @@ CSpellSuggestV &CSpellChecker::Suggest()
// ------------------------------------------------------------------ // ------------------------------------------------------------------
#endif // #if defined(__GOLD_SPELL__) #endif // #if !defined(GCFG_NOSPELLDLL)
// ------------------------------------------------------------------ // ------------------------------------------------------------------

View File

@ -30,13 +30,13 @@
// ------------------------------------------------------------------ // ------------------------------------------------------------------
#if defined(__GOLD_SPELL__) #if !defined(GCFG_NOSPELLDLL)
// ------------------------------------------------------------------ // ------------------------------------------------------------------
#if defined(__WIN32__) #if defined(__WIN32__)
#include <windows.h>
// ------------------------------------------------------------------ // ------------------------------------------------------------------
@ -227,7 +227,7 @@ public:
// ------------------------------------------------------------------ // ------------------------------------------------------------------
#endif //#if defined(__GOLD_SPELL__) #endif //#if !defined(GCFG_NOSPELLDLL)
// ------------------------------------------------------------------ // ------------------------------------------------------------------

View File

@ -547,7 +547,7 @@ bool gareafile::ReadAreafile(word crc, char* parameters) {
#ifndef GCFG_NOXMAIL #ifndef GCFG_NOXMAIL
case CRC_XMAIL: ReadXMail(parameters); break; case CRC_XMAIL: ReadXMail(parameters); break;
#endif #endif
#ifndef GCFG_NOXMAIL #ifndef GCFG_NOSYNCHRONET
case CRC_SBBS: ReadSynchronet(parameters); break; case CRC_SBBS: ReadSynchronet(parameters); break;
#endif #endif
default: return false; default: return false;