Various fixes

This commit is contained in:
Alexander S. Aganichev 2001-08-07 10:51:00 +00:00
parent 4e0b33423b
commit 714aa4ce98
7 changed files with 5 additions and 13 deletions

View File

@ -678,9 +678,7 @@ CfgGed::CfgGed() {
beepfactor = 1000; beepfactor = 1000;
beepyourmail = true; beepyourmail = true;
carboncopylist = CC_NAMES; carboncopylist = CC_NAMES;
cfgdispmargin = NO;
cfgeditquotemargin = 75; cfgeditquotemargin = 75;
cfgquotemargin = 70;
confirmresponse = ASK; confirmresponse = ASK;
crosspost = ASK; crosspost = ASK;
crosspostlist = CC_NAMES; crosspostlist = CC_NAMES;
@ -692,7 +690,7 @@ CfgGed::CfgGed() {
dispareano = true; dispareano = true;
dispattachsize = ATTACH_KBYTES; dispattachsize = ATTACH_KBYTES;
displistcursor = NO; displistcursor = NO;
dispmargin = NO; dispmargin = 0;
dispmsgsize = DISPMSGSIZE_BYTES; dispmsgsize = DISPMSGSIZE_BYTES;
disptabsize = 8; disptabsize = 8;
encodeemailheaders = true; encodeemailheaders = true;

View File

@ -36,8 +36,7 @@ extern char* val;
void CfgDispmargin() { void CfgDispmargin() {
CFG->cfgdispmargin = atoi(val); CFG->dispmargin = atoi(val);
CFG->dispmargin = CFG->cfgdispmargin;
} }
// ------------------------------------------------------------------ // ------------------------------------------------------------------

View File

@ -384,8 +384,7 @@ void CfgQuotectrl() {
void CfgQuotemargin() { void CfgQuotemargin() {
CFG->cfgquotemargin = atoi(val); CFG->quotemargin = atoi(val);
CFG->quotemargin = CFG->cfgquotemargin;
} }
// ------------------------------------------------------------------ // ------------------------------------------------------------------

View File

@ -128,9 +128,7 @@ public:
Grp grp; Grp grp;
int cfgdispmargin;
int cfgeditquotemargin; int cfgeditquotemargin;
int cfgquotemargin;
std::list<CmdKey> cmdkey; std::list<CmdKey> cmdkey;
std::vector<Macro> macro; std::vector<Macro> macro;

View File

@ -2207,7 +2207,7 @@ int IEclass::Start(int __mode, uint* __position, GMsg* __msg) {
else else
margintext = CFG->dispmargin; margintext = CFG->dispmargin;
marginquotes = EDIT->QuoteMargin(); marginquotes = EDIT->QuoteMargin() + 1; // Add one for CR
if(marginquotes > margintext) if(marginquotes > margintext)
marginquotes = margintext; marginquotes = margintext;

View File

@ -765,14 +765,12 @@ void Initialize(int argc, char* argv[]) {
if(CFG->screenmaxcol >= 80) if(CFG->screenmaxcol >= 80)
MAXCOL = CFG->screenmaxcol; MAXCOL = CFG->screenmaxcol;
CFG->dispmargin = CFG->cfgdispmargin;
if(CFG->dispmargin <= 0) if(CFG->dispmargin <= 0)
CFG->dispmargin += MAXCOL; CFG->dispmargin += MAXCOL;
if(CFG->dispmargin > MAXCOL) if(CFG->dispmargin > MAXCOL)
CFG->dispmargin = MAXCOL; CFG->dispmargin = MAXCOL;
CFG->quotemargin = CFG->cfgquotemargin;
if(CFG->quotemargin <= 0) if(CFG->quotemargin <= 0)
CFG->quotemargin += MAXCOL; CFG->quotemargin += MAXCOL;

View File

@ -513,7 +513,7 @@ void LoadText(GMsg* msg, const char* textfile) {
if(*txtptr == LF) if(*txtptr == LF)
*txtptr = CR; *txtptr = CR;
} }
else if((buf[0] == buf[1]) and (buf[0] == buf[2])) { else if(not isspace(buf[0]) and (buf[0] == buf[1]) and (buf[0] == buf[2])) {
if(not isspace(buf[read_len-1])) read_len += 1; if(not isspace(buf[read_len-1])) read_len += 1;
buf[read_len-1] = CR; buf[read_len-1] = CR;
buf[read_len] = NUL; buf[read_len] = NUL;