DispSoftCR now may be used in random system groups. Changed DispSoftCR and UseSoftCrxLat keywords global defaults.

This commit is contained in:
Ianos Gnatiuc 2006-02-04 18:16:51 +00:00
parent 0b433cce50
commit cead5992ee
16 changed files with 59 additions and 26 deletions

View File

@ -307,9 +307,10 @@ VIEWKLUDGE NO
VIEWQUOTE YES ; Show all quotes. VIEWQUOTE YES ; Show all quotes.
;VIEWQUOTE NO ; Show only the first line of each paragraph. ;VIEWQUOTE NO ; Show only the first line of each paragraph.
// DISPSOFTCR <no/yes> (yes)
// Treat the soft-cr (ASCII 141) as any other character. // Treat the soft-cr (ASCII 141) as any other character.
// The soft-cr is a special case in FidoNet and is often stripped. // The soft-cr is a special case in FidoNet and is often stripped.
;DISPSOFTCR YES // Use it in a Random System group for specific areas.
---------------------------------------------------------------------- ----------------------------------------------------------------------
-- MESSAGE READER (MISCELLANEOUS) -- MESSAGE READER (MISCELLANEOUS)
@ -566,9 +567,9 @@ EDITUNDELETE 100
// Do not forget to set DISPSOFTCR to YES! // Do not forget to set DISPSOFTCR to YES!
;EDITSOFTCRXLAT H ; Example for Russians. ;EDITSOFTCRXLAT H ; Example for Russians.
// Enable EditSoftCrxLat (Yes). May be used in random system groups. // USESOFTCRXLAT <no/yes> (no)
;UseSoftCrxLat No // Enable or disable EDITSOFTCRXLAT.
UseSoftCrxLat Yes // Use it in a Random System group for specific areas.
// Right margin for editing quotes in the internal editor. // Right margin for editing quotes in the internal editor.
// EDITQUOTEMARGIN 78 // EDITQUOTEMARGIN 78
@ -2049,6 +2050,7 @@ ENDGROUP
// AreaReplyDirect // AreaReplyDirect
// AreaReplyTo // AreaReplyTo
// Attributes // Attributes
// DispSoftCR
// EditHardTerm // EditHardTerm
// EditReplyRe // EditReplyRe
// ForceTemplate // ForceTemplate

View File

@ -289,7 +289,8 @@ ViewQuote Yes ;
;ViewQuote No ; <20>®ª §ë¢ âì ⮫쪮 ¯¥à¢ë¥ áâப¨ ª ¦¤®£® ¯ à £à ä . ;ViewQuote No ; <20>®ª §ë¢ âì ⮫쪮 ¯¥à¢ë¥ áâப¨ ª ¦¤®£® ¯ à £à ä .
// ‚뢮¤¨âì ¬ï£ª¨© ¯¥à¥¢®¤ áâப¨ (ASCII 141) ª ª «î¡®© ¤à㣮© ᨬ¢®«. // ‚뢮¤¨âì ¬ï£ª¨© ¯¥à¥¢®¤ áâப¨ (ASCII 141) ª ª «î¡®© ¤à㣮© ᨬ¢®«.
DispSoftCR Yes ; Ž¡ï§ â¥«ì­® ¤«ï R50! // ˆá¯®«ì§ã©â¥ íâ®â ¯ à ¬¥âà ¢ £à㯯 å.
;DispSoftCR <No/Yes> (Yes)
// ‘âப , ¯®¤áâ ¢«ï¥¬ ï ¯® 㬮«ç ­¨î ¢ áâப㠪à¨â¥à¨ï ¯®¨áª . // ‘âப , ¯®¤áâ ¢«ï¥¬ ï ¯® 㬮«ç ­¨î ¢ áâப㠪à¨â¥à¨ï ¯®¨áª .
;SearchFor ["]<string|string|..>["] ;SearchFor ["]<string|string|..>["]
@ -613,9 +614,9 @@ EditUnDelete 50
// ᨬ¢®« ASCII 141 ­  ¤à㣮©. // ᨬ¢®« ASCII 141 ­  ¤à㣮©.
EditSoftCrxLat H ; †¥« â¥«ì­® ¤«ï R50! EditSoftCrxLat H ; †¥« â¥«ì­® ¤«ï R50!
// EditSoftCrxLat ¬®¦¥â ¡ëâì ®âª«î祭® £«®¡ «ì­® ¨«¨ ¢ £à㯯 å. // <EFBFBD>⨬ ¯ à ¬¥â஬ ¬®¦­® ¢ª«îç¨âì ¨«¨ ¢ëª«îç¨âì EditSoftCrxLat.
;UseSoftCrxLat No // ˆá¯®«ì§ã©â¥ íâ®â ¯ à ¬¥âà ¢ £à㯯 å.
UseSoftCrxLat Yes ;UseSoftCrxLat <No/Yes> (No)
// ˜¨à¨­  ¯®«ï ¢ë¢®¤  ¤«ï । ªâ¨à®¢ ­¨ï æ¨â¨à㥬ëå áâப. // ˜¨à¨­  ¯®«ï ¢ë¢®¤  ¤«ï । ªâ¨à®¢ ­¨ï æ¨â¨à㥬ëå áâப.
EditQuoteMargin 75 EditQuoteMargin 75
@ -2402,6 +2403,7 @@ EndGroup
// AreaFreqTo // AreaFreqTo
// AreaReplyDirect // AreaReplyDirect
// AreaReplyTo // AreaReplyTo
// DispSoftCR
// Attributes // Attributes
// EditHardTerm // EditHardTerm
// EditReplyRe // EditReplyRe

View File

@ -10,6 +10,12 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/ Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________ ______________________________________________________________________
! Changed keywords global defaults:
DispSoftCR Yes
UseSoftCrxLat No
+ DispSoftCR now may be used in random system groups.
+ Charset translation tables to convert between CP866 and CP850 is created. + Charset translation tables to convert between CP866 and CP850 is created.
= Snapshot for the February 01, 2006. = Snapshot for the February 01, 2006.

View File

@ -723,6 +723,7 @@ CfgGed::CfgGed() {
dispmargin = 0; dispmargin = 0;
dispmsgsize = DISPMSGSIZE_BYTES; dispmsgsize = DISPMSGSIZE_BYTES;
disppmfirst = true; disppmfirst = true;
dispsoftcr = true;
disptabsize = 8; disptabsize = 8;
encodeemailheaders = true; encodeemailheaders = true;
externoptions = EXTUTIL_CLS | EXTUTIL_CURSOR | EXTUTIL_RELOAD | EXTUTIL_PAUSEONERROR | EXTUTIL_KEEPCTRL; externoptions = EXTUTIL_CLS | EXTUTIL_CURSOR | EXTUTIL_RELOAD | EXTUTIL_PAUSEONERROR | EXTUTIL_KEEPCTRL;
@ -802,7 +803,7 @@ CfgGed::CfgGed() {
useintl = true; useintl = true;
usepid = true; usepid = true;
usernameno = 0; usernameno = 0;
usesoftcrxlat = true; usesoftcrxlat = false;
usestylies = true; usestylies = true;
usetzutc = false; usetzutc = false;
viewhidden = false; viewhidden = false;

View File

@ -72,7 +72,6 @@ tglobalbool globalbool[gswitches_last] = {
{ CRC_MSGLISTPAGEBAR }, // 0x8041; { CRC_MSGLISTPAGEBAR }, // 0x8041;
{ CRC_BEEPNOISES }, // 0x84D5; { CRC_BEEPNOISES }, // 0x84D5;
{ CRC_SCREENSHADOWS }, // 0x8543; { CRC_SCREENSHADOWS }, // 0x8543;
{ CRC_DISPSOFTCR }, // 0x85E9;
{ CRC_EMPTYTEARLINE }, // 0x8D0A; { CRC_EMPTYTEARLINE }, // 0x8D0A;
{ CRC_MENUDROPMSG }, // 0x9645; { CRC_MENUDROPMSG }, // 0x9645;
{ CRC_BEEPLOCALMSG }, // 0x984C; { CRC_BEEPLOCALMSG }, // 0x984C;
@ -288,6 +287,7 @@ SwitchD:
case CRC_DISPMARGIN : CfgDispmargin (); break; case CRC_DISPMARGIN : CfgDispmargin (); break;
case CRC_DISPMSGSIZE : CfgDispmsgsize (); break; case CRC_DISPMSGSIZE : CfgDispmsgsize (); break;
case CRC_DISPPMFIRST : CfgDisppmfirst (); break; case CRC_DISPPMFIRST : CfgDisppmfirst (); break;
case CRC_DISPSOFTCR : CfgDispsoftcr (); break;
case CRC_DISPTABSIZE : CfgDisptabsize (); break; case CRC_DISPTABSIZE : CfgDisptabsize (); break;
default : found = false; default : found = false;
} }

View File

@ -69,6 +69,18 @@ void CfgDisppmfirst() {
// ------------------------------------------------------------------ // ------------------------------------------------------------------
void CfgDispsoftcr()
{
bool flag = make_bool(GetYesno(val));
if (cfgingroup)
CFG->grp.AddItm(GRP_DISPSOFTCR, flag);
else
CFG->dispsoftcr = flag;
}
// ------------------------------------------------------------------
void CfgDisptabsize() { void CfgDisptabsize() {
CFG->disptabsize = atoi(val); CFG->disptabsize = atoi(val);

View File

@ -59,7 +59,6 @@ enum en_gswitches {
msglistpagebar, msglistpagebar,
beepnoises, beepnoises,
screenshadows, screenshadows,
dispsoftcr,
emptytearline, emptytearline,
menudropmsg, menudropmsg,
beeplocalmsg, beeplocalmsg,
@ -211,6 +210,7 @@ public:
int dispmargin; // rightmargin; int dispmargin; // rightmargin;
bool disppmfirst; bool disppmfirst;
int dispmsgsize; int dispmsgsize;
bool dispsoftcr;
uint disptabsize; // tabsize; uint disptabsize; // tabsize;
bool encodeemailheaders; bool encodeemailheaders;
std::vector<GEvent> event; std::vector<GEvent> event;

View File

@ -1048,7 +1048,6 @@ void Initialize(int argc, char* argv[]) {
for(w = 0, i = CFG->username.begin(); w < WideUsernames; w++, i++) for(w = 0, i = CFG->username.begin(); w < WideUsernames; w++, i++)
WideUsername[w] = i->name; WideUsername[w] = i->name;
WidePersonalmail = CFG->personalmail; WidePersonalmail = CFG->personalmail;
WideDispsoftcr = CFG->switches.get(dispsoftcr);
if(CFG->loadlanguage[0]) if(CFG->loadlanguage[0])
LoadLanguage(CFG->loadlanguage); LoadLanguage(CFG->loadlanguage);

View File

@ -1809,7 +1809,8 @@ char* XlatStr(char* dest, const char* src, int level, Chs* chrtbl, int qpencoded
case SOFTCR: case SOFTCR:
translated = false; translated = false;
if(CompTable and not CFG->switches.get(dispsoftcr)) { if (CompTable and not WideDispsoftcr)
{
if(sptr > src) { if(sptr > src) {
if(not (isspace(*(sptr-1)) or isspace(*(sptr+1)))) { if(not (isspace(*(sptr-1)) or isspace(*(sptr+1)))) {
for(n=0; n<CompTable->size; n++) { for(n=0; n<CompTable->size; n++) {
@ -1836,7 +1837,7 @@ char* XlatStr(char* dest, const char* src, int level, Chs* chrtbl, int qpencoded
} }
} }
} }
else if(CFG->switches.get(dispsoftcr)) else if (WideDispsoftcr)
goto defaultchardo; goto defaultchardo;
if(not translated) if(not translated)
*dptr++ = *sptr++; *dptr++ = *sptr++;
@ -2419,7 +2420,7 @@ void MakeLineIndex(GMsg* msg, int margin, bool getvalue, bool header_recode) {
ptr++; ptr++;
break; break;
case SOFTCR: case SOFTCR:
if(CFG->switches.get(dispsoftcr)) if (WideDispsoftcr)
goto defaultchardo; goto defaultchardo;
else { else {
if(CompTable) { if(CompTable) {
@ -2931,7 +2932,8 @@ int LoadCharset(const char* imp, const char* exp, int query) {
current_table = n; current_table = n;
// Disable softcr translation unless DISPSOFTCR is enabled // Disable softcr translation unless DISPSOFTCR is enabled
if(not CFG->switches.get(dispsoftcr)) { if (not WideDispsoftcr)
{
char* tptr = (char*)ChsTP[SOFTCR]; char* tptr = (char*)ChsTP[SOFTCR];
*tptr++ = 1; *tptr++ = 1;
*tptr = SOFTCR; *tptr = SOFTCR;

View File

@ -742,8 +742,9 @@ void GMsg::LinesToText() {
if((*(_bptr-1) != ' ') and (*_line->next->txt.c_str() != ' ')) if((*(_bptr-1) != ' ') and (*_line->next->txt.c_str() != ' '))
if(_softterm or not _hardterm) if(_softterm or not _hardterm)
*_bptr++ = ' '; *_bptr++ = ' ';
if(not _hardterm) { if (not _hardterm)
if(_softterm and not CFG->switches.get(dispsoftcr)) {
if (_softterm and not WideDispsoftcr)
*_bptr++ = SOFTCR; *_bptr++ = SOFTCR;
_hterm = false; _hterm = false;
} }

View File

@ -441,13 +441,15 @@ uint32_t getClassicMsgId();
// ------------------------------------------------------------------ // ------------------------------------------------------------------
// SOFTCR management // SOFTCR management
inline bool issoftcr(char c) { inline bool issoftcr(char c)
return (c == SOFTCR) and not CFG->switches.get(dispsoftcr); {
return (c == SOFTCR) and not WideDispsoftcr;
} }
inline char *spanspaces(const char *str) { inline char *spanspaces(const char *str)
if(CFG->switches.get(dispsoftcr)) {
if (WideDispsoftcr)
while(isspace(*str) and (*str != CR)) while(isspace(*str) and (*str != CR))
str++; str++;
else else
@ -457,8 +459,9 @@ inline char *spanspaces(const char *str) {
} }
inline char *spanfeeds(const char *str) { inline char *spanfeeds(const char *str)
if(CFG->switches.get(dispsoftcr)) {
if (WideDispsoftcr)
while(*str == LF) while(*str == LF)
str++; str++;
else else

View File

@ -137,6 +137,7 @@ void Area::InitData() {
adat->ctrlinfo = CFG->ctrlinfoecho; adat->ctrlinfo = CFG->ctrlinfoecho;
else else
adat->ctrlinfo = CFG->ctrlinfolocal; adat->ctrlinfo = CFG->ctrlinfolocal;
WideDispsoftcr = adat->dispsoftcr = CFG->dispsoftcr;
adat->edithardterm = EDIT->HardTerm(); adat->edithardterm = EDIT->HardTerm();
adat->editmixcase = EDIT->MixCase(); adat->editmixcase = EDIT->MixCase();
adat->forcetemplate = CFG->forcetemplate; adat->forcetemplate = CFG->forcetemplate;
@ -294,6 +295,8 @@ void Area::RandomizeData(int mode) {
CFG->grp.GetItm(GRP_AREAREPLYTO, adat->areareplyto, sizeof(adat->areareplyto)); CFG->grp.GetItm(GRP_AREAREPLYTO, adat->areareplyto, sizeof(adat->areareplyto));
CFG->grp.GetItm(GRP_AREAYOUWROTETO, adat->areayouwroteto, sizeof(adat->areayouwroteto)); CFG->grp.GetItm(GRP_AREAYOUWROTETO, adat->areayouwroteto, sizeof(adat->areayouwroteto));
CFG->grp.GetItm(GRP_CTRLINFO, adat->ctrlinfo); CFG->grp.GetItm(GRP_CTRLINFO, adat->ctrlinfo);
CFG->grp.GetItm(GRP_DISPSOFTCR, adat->dispsoftcr);
WideDispsoftcr = adat->dispsoftcr;
CFG->grp.GetItm(GRP_EDITHARDTERM, adat->edithardterm); CFG->grp.GetItm(GRP_EDITHARDTERM, adat->edithardterm);
CFG->grp.GetItm(GRP_EDITMIXCASE, adat->editmixcase); CFG->grp.GetItm(GRP_EDITMIXCASE, adat->editmixcase);
CFG->grp.GetItm(GRP_EDITREPLYRE, adat->replyre); CFG->grp.GetItm(GRP_EDITREPLYRE, adat->replyre);

View File

@ -275,6 +275,7 @@ struct AreaData {
Echo areareplyto; Echo areareplyto;
Echo areayouwroteto; Echo areayouwroteto;
int ctrlinfo; int ctrlinfo;
bool dispsoftcr;
bool edithardterm; bool edithardterm;
bool editmixcase; bool editmixcase;
bool forcetemplate; bool forcetemplate;

View File

@ -57,6 +57,7 @@ enum {
GRP_AREAYOUWROTETO, GRP_AREAYOUWROTETO,
GRP_ATTRIBUTES, GRP_ATTRIBUTES,
GRP_CTRLINFO, GRP_CTRLINFO,
GRP_DISPSOFTCR,
GRP_EDITHARDTERM, GRP_EDITHARDTERM,
GRP_EDITMIXCASE, GRP_EDITMIXCASE,
GRP_EDITREPLYRE, GRP_EDITREPLYRE,

View File

@ -35,7 +35,7 @@ int WideCanLock = true;
const char** WideUsername = NULL; const char** WideUsername = NULL;
int WideUsernames = 0; int WideUsernames = 0;
uint WideSharemode = SH_DENYNO; uint WideSharemode = SH_DENYNO;
int WideDispsoftcr = false; bool WideDispsoftcr = true;
int WidePersonalmail = 0; int WidePersonalmail = 0;

View File

@ -267,7 +267,7 @@ extern int WideCanLock;
extern const char** WideUsername; extern const char** WideUsername;
extern int WideUsernames; extern int WideUsernames;
extern uint WideSharemode; extern uint WideSharemode;
extern int WideDispsoftcr; extern bool WideDispsoftcr;
extern int WidePersonalmail; extern int WidePersonalmail;