Xmas fixes
This commit is contained in:
parent
4156d37847
commit
748f2ea804
@ -12,6 +12,22 @@ ______________________________________________________________________
|
||||
Notes for GoldED+ 1.1.5, December xx 2000
|
||||
______________________________________________________________________
|
||||
|
||||
- Fixed keyboard handling in Win9x/ME (not well tested).
|
||||
|
||||
- Control characters (except tab, CR and LF) no longer stripped at the
|
||||
end of line.
|
||||
|
||||
+ If there's Reply-To: line in the beginning of message then it
|
||||
processed internally like REPLYADDR kludge with higher priority.
|
||||
|
||||
- Fixed EditMacro command to be able to execute commands which
|
||||
operates on selected block.
|
||||
|
||||
- One more quirk in Undo fixed.
|
||||
|
||||
- Fixed expansion of environment variables in GoldNode and for
|
||||
includes and areafile definition.
|
||||
|
||||
+ Added new keyword QUOTESTOPS. If one of characters defined by this
|
||||
keyword found before quotechar then line will be not treated as
|
||||
quote. Defaults to "<\"'-", may be used as global keyword or in
|
||||
@ -47,7 +63,7 @@ ______________________________________________________________________
|
||||
* Origin: bla-bla-bla (2:5020/604.19@fidonet)
|
||||
|
||||
This style doesn't break any of FTS or FSC. Domain from Address or
|
||||
AKA keyword overrides Netname keyword if specific address used.
|
||||
AKA keywords override Netname keyword if specific address used.
|
||||
This keyword could be used in random system groups.
|
||||
|
||||
+ Added READDirQuoteMsg and READMoveDirQuoteMsg entries for
|
||||
|
@ -767,6 +767,7 @@ int ReadCfg(const char* cfgfile, int ignoreunknown) {
|
||||
if(not _gotcond) {
|
||||
switch(crc) {
|
||||
case CRC_INCLUDE:
|
||||
strschg_environ(val);
|
||||
if(not quiet)
|
||||
cout << "* Including " << val << endl;
|
||||
ReadCfg(val); // NOTE! This is a recursive call!
|
||||
@ -774,6 +775,7 @@ int ReadCfg(const char* cfgfile, int ignoreunknown) {
|
||||
cout << "* Resuming " << cfg << endl;
|
||||
break;
|
||||
case CRC_AREAFILE:
|
||||
strschg_environ(val);
|
||||
if(not quiet)
|
||||
cout << "* Handling " << key << " " << val << endl;
|
||||
AL.GetAreafile(val);
|
||||
|
@ -449,7 +449,7 @@ void GPickArealist::AreaCatchUp(uint n) {
|
||||
|
||||
// Do not do catch up if there's active area
|
||||
if(AA->isopen())
|
||||
return false;
|
||||
return;
|
||||
|
||||
GMenuAreaCatchup MenuAreaCatchup;
|
||||
GMsg* msg = (GMsg*)throw_calloc(1, sizeof(GMsg));
|
||||
@ -735,10 +735,10 @@ bool GPickArealist::handle_key() {
|
||||
default:
|
||||
if(key < KK_Macro) {
|
||||
n = toupper(key & 0xFF);
|
||||
if((area_fuzidx < area_maxfuz) or key == Key_BS) {
|
||||
if((area_fuzidx < area_maxfuz) or (key == Key_BS)) {
|
||||
|
||||
// Incremental search in the echoids
|
||||
if(not (n < ' ') or key == Key_BS) {
|
||||
if(not iscntrl(n) or (key == Key_BS)) {
|
||||
if(n == ' ')
|
||||
n = '_';
|
||||
if(key != Key_BS)
|
||||
|
@ -159,7 +159,7 @@ char* mime_header_encode(char* dest, const char* source, GMsg* msg) {
|
||||
lp--;
|
||||
|
||||
for(const char* ptr = s; *ptr and (ptr<=lp); ptr++) {
|
||||
if((*ptr < ' ') or (*ptr > '\x7F') or (inmime and strchr(" =?", *ptr))) {
|
||||
if(iscntrl(*ptr) or not isascii(*ptr) or (inmime and strchr(" =?", *ptr))) {
|
||||
if(not inmime) {
|
||||
if(msg->charset) {
|
||||
bp = stpcpy(bp, "=?");
|
||||
|
@ -78,7 +78,7 @@ void SaveLines(int mode, const char* savefile, GMsg* msg, bool clip) {
|
||||
while(p != line->txt.end()) {
|
||||
if(mode == MODE_WRITE) {
|
||||
// Replace control codes, except the ANSI escape code
|
||||
if(*p < ' ') {
|
||||
if(iscntrl(*p)) {
|
||||
// only allow ESC in file write
|
||||
if(prn or (*p != '\x1B')) {
|
||||
*p = (*p == CTRL_A) ? '@' : '.';
|
||||
|
@ -800,6 +800,9 @@ Line* IEclass::wrapit(Line** __currline, uint* __curr_col, uint* __curr_row, int
|
||||
}
|
||||
}
|
||||
|
||||
// Was this line truncated at space?
|
||||
bool truncated_at_space = isspace(_thisline->txt[_wrappos]);
|
||||
|
||||
// Truncate at the wrapping location
|
||||
_thisline->txt.erase(_wrappos);
|
||||
|
||||
@ -808,17 +811,15 @@ Line* IEclass::wrapit(Line** __currline, uint* __curr_col, uint* __curr_row, int
|
||||
|
||||
// Trim spaces off the end of the line
|
||||
int _trimpos = _wrappos - 1;
|
||||
if(_thisline->txt[_trimpos] == ' ') {
|
||||
while(_trimpos > 0 and _thisline->txt[_trimpos-1] == ' ')
|
||||
if(isspace(_thisline->txt[_trimpos])) {
|
||||
while(_trimpos > 0 and isspace(_thisline->txt[_trimpos-1]))
|
||||
_trimpos--;
|
||||
if(_quotelen and _trimpos < _quotelen)
|
||||
if(_quotelen and (_trimpos < _quotelen))
|
||||
_trimpos++;
|
||||
Undo->PushItem(EDIT_UNDO_OVR_CHAR|BATCH_MODE, _thisline, _trimpos);
|
||||
Undo->PushItem(EDIT_UNDO_OVR_CHAR|BATCH_MODE, _thisline, _trimpos+1);
|
||||
_thisline->txt.erase(_trimpos);
|
||||
}
|
||||
else
|
||||
Undo->PushItem(EDIT_UNDO_OVR_CHAR|BATCH_MODE, _thisline, _wrappos);
|
||||
Undo->PushItem((truncated_at_space?EDIT_UNDO_OVR_CHAR:EDIT_UNDO_INS_CHAR)|BATCH_MODE, _thisline, _trimpos+1);
|
||||
|
||||
// Append a new linefeed
|
||||
_thisline->txt += "\n";
|
||||
@ -1990,7 +1991,7 @@ void IEclass::statusline() {
|
||||
|
||||
int IEclass::handlekey(gkey __key) {
|
||||
|
||||
int rc = YES;
|
||||
int rc = true;
|
||||
|
||||
switch(__key) {
|
||||
case KK_EditBlockRight: __key = KK_EditGoRight; break;
|
||||
@ -2019,6 +2020,10 @@ int IEclass::handlekey(gkey __key) {
|
||||
break;
|
||||
|
||||
default:
|
||||
rc = PlayMacro(__key, KT_E);
|
||||
if(rc == true)
|
||||
return rc;
|
||||
rc = true;
|
||||
if(selecting) {
|
||||
Line *_line;
|
||||
selecting = NO;
|
||||
@ -2113,7 +2118,8 @@ noselecting:
|
||||
case KK_EditPaste: BlockPaste(); break;
|
||||
|
||||
default:
|
||||
rc = PlayMacro(__key, KT_E);
|
||||
rc = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if(__key != KK_EditUndo)
|
||||
@ -2402,8 +2408,7 @@ void UndoStack::PushItem(uint action, Line* __line, uint __col, uint __len) {
|
||||
case EDIT_UNDO_INS_TEXT:
|
||||
case EDIT_UNDO_WRAP_TEXT:
|
||||
last_item->line = __line;
|
||||
throw_new(last_item->data.text_ptr = new(__len) text_item(__col, __len));
|
||||
memcpy(last_item->data.text_ptr->text, __line->txt.c_str() + __col, __len);
|
||||
throw_new(last_item->data.text_ptr = new text_item(__col, __len));
|
||||
break;
|
||||
case EDIT_UNDO_NEW_LINE:
|
||||
last_item->line = last_item->data.line_ptr = __line;
|
||||
|
@ -750,7 +750,7 @@ void IEclass::BlockPaste() {
|
||||
// insert into current line
|
||||
currline->txt.insert(col, _pasteline->txt);
|
||||
Undo->PushItem(EDIT_UNDO_INS_TEXT|BATCH_MODE, currline, col, pastelen);
|
||||
col += _pasteline->txt.length();
|
||||
col += pastelen;
|
||||
wrapins(&currline, &col, &row, NO);
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ char* strconv(char* str, char* conv) {
|
||||
NW(conv); // Dummy
|
||||
|
||||
while(*str) {
|
||||
if((*str < ' ') and (*str != '\n') and (*str != '\r')) // Control codes
|
||||
if(iscntrl(*str) and (*str != '\n') and (*str != '\r')) // Control codes
|
||||
*p++ = '.';
|
||||
else
|
||||
*p++ = *str;
|
||||
|
@ -1605,6 +1605,14 @@ void ScanKludges(GMsg* msg, int getvalue) {
|
||||
if(not AA->isinternet())
|
||||
*msg->ito = NUL;
|
||||
}
|
||||
else if(strnieql(line->txt.c_str(), "Reply-To:", 9)) {
|
||||
const char* ptr = line->txt.c_str() + 9;
|
||||
ptr = strskip_wht(ptr);
|
||||
char* tmp = UnwrapLine(line, ptr);
|
||||
KludgeREPLYADDR(msg, tmp ? tmp : ptr);
|
||||
if(tmp)
|
||||
throw_free(tmp);
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
@ -34,6 +34,25 @@ uint position;
|
||||
ulong msgcount = 0;
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
string &strtrimline(string &p) {
|
||||
|
||||
if(not p.empty()) {
|
||||
string::iterator trail = p.end();
|
||||
while(trail != p.begin()) {
|
||||
--trail;
|
||||
if(not strchr(" \t\r\n", *trail) and not issoftcr(*trail)) {
|
||||
++trail;
|
||||
break;
|
||||
}
|
||||
}
|
||||
p.erase(trail, p.end());
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
const char* get_subject_re_info(const char* s, ulong& n) {
|
||||
@ -549,7 +568,7 @@ static void MakeMsg2(int& mode, int& status, int& forwstat, int& topline, GMsg*
|
||||
if(((line->type & GLINE_HIDD) and not AA->Viewhidden()) or ((line->type & GLINE_KLUD) and not AA->Viewkludge()))
|
||||
newline = line = DeleteLine(line);
|
||||
else {
|
||||
strtrim(line->txt);
|
||||
strtrimline(line->txt);
|
||||
if(line->type & GLINE_HARD)
|
||||
line->txt += "\n";
|
||||
else
|
||||
@ -570,13 +589,13 @@ static void MakeMsg2(int& mode, int& status, int& forwstat, int& topline, GMsg*
|
||||
if(status != MODE_QUIT) {
|
||||
line = msg->lin;
|
||||
while(line) {
|
||||
if(line->txt.find(LF) != line->txt.npos)
|
||||
if(line->txt.find('\n') != line->txt.npos)
|
||||
line->type = GLINE_HARD;
|
||||
else if(line->next and (line->next->type & GLINE_QUOT))
|
||||
line->type = GLINE_HARD;
|
||||
else
|
||||
line->type = 0;
|
||||
strtrim(line->txt);
|
||||
strtrimline(line->txt);
|
||||
if(AA->isinternet()) {
|
||||
// Check for signature indicator
|
||||
if(streql(line->txt.c_str(), "--")) {
|
||||
|
@ -325,7 +325,7 @@ int is_quote(const char* ptr) {
|
||||
if(spaces > 1)
|
||||
return false;
|
||||
}
|
||||
else if((*ptr < ' ') or strchr(AA->Quotestops(), *ptr)) {
|
||||
else if(iscntrl(*ptr) or strchr(AA->Quotestops(), *ptr)) {
|
||||
// Found a char that cannot occur in a quotestring
|
||||
return false;
|
||||
}
|
||||
|
@ -1154,7 +1154,7 @@ gkey kbxget_raw(int mode) {
|
||||
k = 0;
|
||||
PeekConsoleInput(gkbd_hin, &inp, 1, &nread);
|
||||
if(nread) {
|
||||
if((inp.EventType & KEY_EVENT) and inp.Event.KeyEvent.bKeyDown) {
|
||||
if((inp.EventType == KEY_EVENT) and inp.Event.KeyEvent.bKeyDown) {
|
||||
int kc = gkbd_nt2bios(inp);
|
||||
if((kc != -1) or (inp.Event.KeyEvent.wVirtualKeyCode == 0xBA)) {
|
||||
k = (gkey)kc;
|
||||
@ -1181,7 +1181,7 @@ gkey kbxget_raw(int mode) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(inp.EventType == KEY_EVENT and inp.Event.KeyEvent.bKeyDown) {
|
||||
if((inp.EventType == KEY_EVENT) and inp.Event.KeyEvent.bKeyDown) {
|
||||
bool alt_pressed = (CKS & (LEFT_ALT_PRESSED|RIGHT_ALT_PRESSED)) ? true : false;
|
||||
bool ctrl_pressed = (CKS & (LEFT_CTRL_PRESSED|RIGHT_CTRL_PRESSED)) ? true : false;
|
||||
bool shift_pressed = (CKS & SHIFT_PRESSED) ? true : false;
|
||||
@ -1191,8 +1191,8 @@ gkey kbxget_raw(int mode) {
|
||||
|
||||
if(alt_pressed)
|
||||
special_key = is_numpad_key(inp); // Alt-<numpad key>
|
||||
else if(isprint(ascii) and not ctrl_pressed)
|
||||
special_key = not gkbd_nt; // It is alphanumeric key under Win9x
|
||||
else if(not gkbd_nt and (ascii and not ctrl_pressed) and not (iscntrl(ascii) and shift_pressed))
|
||||
special_key = true; // It is alphanumeric key under Win9x
|
||||
if(special_key) {
|
||||
ReadConsole(gkbd_hin, &ascii, 1, &nread, NULL);
|
||||
if(alt_pressed) {
|
||||
|
@ -67,7 +67,7 @@
|
||||
#define __GPID__ "GoldNODE+"
|
||||
#endif
|
||||
|
||||
#define __GVER__ "1.1.4.1" // Visible version
|
||||
#define __GVER__ "1.1.5" // Visible version
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
@ -1203,7 +1203,7 @@ static int parse_config(const char *__configfile, Addr& zoneaddr) {
|
||||
if((not _gotcond) and cond_status) {
|
||||
switch(crc) {
|
||||
case CRC_NODEPATH:
|
||||
nodepath = value;
|
||||
PathCopy(nodepath, value);
|
||||
break;
|
||||
case CRC_ADDRESS:
|
||||
case CRC_AKA:
|
||||
@ -1230,6 +1230,7 @@ static int parse_config(const char *__configfile, Addr& zoneaddr) {
|
||||
ndz.point = 0;
|
||||
ndl.ft = (dword)-1;
|
||||
ndl.fc = NO;
|
||||
strschg_environ(value);
|
||||
strcpy(ndl.fn, value);
|
||||
nodelist.push_back(ndl);
|
||||
nodezone.push_back(ndz);
|
||||
@ -1253,6 +1254,7 @@ static int parse_config(const char *__configfile, Addr& zoneaddr) {
|
||||
ndz.point = 0;
|
||||
ndl.ft = (dword)-1;
|
||||
ndl.fc = NO;
|
||||
strschg_environ(value);
|
||||
strcpy(ndl.fn, value);
|
||||
userlist.push_back(ndl);
|
||||
userzone.push_back(ndz);
|
||||
@ -1279,6 +1281,7 @@ static int parse_config(const char *__configfile, Addr& zoneaddr) {
|
||||
sh_mod = 0;
|
||||
break;
|
||||
case CRC_INCLUDE:
|
||||
strschg_environ(value);
|
||||
if(not parse_config(value,zoneaddr)) // NOTE! This is a recursive call!
|
||||
fast_printf("* Could not read configuration file '%s' !\n",value);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user