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

View File

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

View File

@ -10,6 +10,12 @@ ______________________________________________________________________
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.
= Snapshot for the February 01, 2006.

View File

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

View File

@ -72,7 +72,6 @@ tglobalbool globalbool[gswitches_last] = {
{ CRC_MSGLISTPAGEBAR }, // 0x8041;
{ CRC_BEEPNOISES }, // 0x84D5;
{ CRC_SCREENSHADOWS }, // 0x8543;
{ CRC_DISPSOFTCR }, // 0x85E9;
{ CRC_EMPTYTEARLINE }, // 0x8D0A;
{ CRC_MENUDROPMSG }, // 0x9645;
{ CRC_BEEPLOCALMSG }, // 0x984C;
@ -288,6 +287,7 @@ SwitchD:
case CRC_DISPMARGIN : CfgDispmargin (); break;
case CRC_DISPMSGSIZE : CfgDispmsgsize (); break;
case CRC_DISPPMFIRST : CfgDisppmfirst (); break;
case CRC_DISPSOFTCR : CfgDispsoftcr (); break;
case CRC_DISPTABSIZE : CfgDisptabsize (); break;
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() {
CFG->disptabsize = atoi(val);

View File

@ -59,7 +59,6 @@ enum en_gswitches {
msglistpagebar,
beepnoises,
screenshadows,
dispsoftcr,
emptytearline,
menudropmsg,
beeplocalmsg,
@ -211,6 +210,7 @@ public:
int dispmargin; // rightmargin;
bool disppmfirst;
int dispmsgsize;
bool dispsoftcr;
uint disptabsize; // tabsize;
bool encodeemailheaders;
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++)
WideUsername[w] = i->name;
WidePersonalmail = CFG->personalmail;
WideDispsoftcr = CFG->switches.get(dispsoftcr);
if(CFG->loadlanguage[0])
LoadLanguage(CFG->loadlanguage);

View File

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

View File

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

View File

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

View File

@ -137,6 +137,7 @@ void Area::InitData() {
adat->ctrlinfo = CFG->ctrlinfoecho;
else
adat->ctrlinfo = CFG->ctrlinfolocal;
WideDispsoftcr = adat->dispsoftcr = CFG->dispsoftcr;
adat->edithardterm = EDIT->HardTerm();
adat->editmixcase = EDIT->MixCase();
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_AREAYOUWROTETO, adat->areayouwroteto, sizeof(adat->areayouwroteto));
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_EDITMIXCASE, adat->editmixcase);
CFG->grp.GetItm(GRP_EDITREPLYRE, adat->replyre);

View File

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

View File

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

View File

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

View File

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