DispSoftCR now may be used in random system groups. Changed DispSoftCR and UseSoftCrxLat keywords global defaults.
This commit is contained in:
@@ -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;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
|
@@ -275,6 +275,7 @@ struct AreaData {
|
||||
Echo areareplyto;
|
||||
Echo areayouwroteto;
|
||||
int ctrlinfo;
|
||||
bool dispsoftcr;
|
||||
bool edithardterm;
|
||||
bool editmixcase;
|
||||
bool forcetemplate;
|
||||
|
Reference in New Issue
Block a user