From 72b46c9befa884a0b1806c1b4de5b02f2d5b57e2 Mon Sep 17 00:00:00 2001 From: "Alexander S. Aganichev" Date: Fri, 3 May 2002 15:24:02 +0000 Subject: [PATCH] Fixed fuzzy sorting, net/echomail.bss updating, compiling on gcc 3.x --- docs/notework.txt | 5 +++++ golded3/gealst.cpp | 2 +- golded3/geread2.cpp | 2 +- goldlib/gmb3/gmohuds4.cpp | 24 +++++++++++++++--------- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/docs/notework.txt b/docs/notework.txt index d7d946a..8f34dda 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -12,6 +12,11 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ +- Fixed net/echomail.bss updating in Hudson/GoldBase. + +- Fixed reverse order sorting in 'F' criteria of AREALISTSORT (broken + in previous snapshots). + - GoldED+ should no longer exit when system time is changed to the past and Timeout is non-zero. But... Timeout still calculated from timestamp of previous keypress. diff --git a/golded3/gealst.cpp b/golded3/gealst.cpp index 15ea235..2f8ed02 100644 --- a/golded3/gealst.cpp +++ b/golded3/gealst.cpp @@ -145,7 +145,7 @@ extern "C" int AreaListCmp(const Area** __a, const Area** __b) { register bool amay = striinc(area_maybe, A->echoid()) ? true : false; register bool bmay = striinc(area_maybe, B->echoid()) ? true : false; - if((cmp = compare_two(amay, bmay)) != 0) + if((cmp = compare_two(bmay, amay)) != 0) return cmp; } break; diff --git a/golded3/geread2.cpp b/golded3/geread2.cpp index a5b8a8d..033d721 100644 --- a/golded3/geread2.cpp +++ b/golded3/geread2.cpp @@ -604,7 +604,7 @@ int ExternUtil(GMsg *msg, int utilno) { for(int utlno=0; extutil != CFG->externutil.end(); utlno++, extutil++) { if(extutil->utilno == utilno) { - return ExternUtil(msg, extutil); + return ExternUtil(msg, &(*extutil)); } } diff --git a/goldlib/gmb3/gmohuds4.cpp b/goldlib/gmb3/gmohuds4.cpp index b912d78..932fa21 100644 --- a/goldlib/gmb3/gmohuds4.cpp +++ b/goldlib/gmb3/gmohuds4.cpp @@ -62,20 +62,26 @@ void _HudsWide::update_netecho // Delete or add the header index if(__delete) { - if(_pos < _total) { + if(_total and (_scanidx[_closest] == __hdridx)) { + if(_closest != _total) { + memmove(_scanidx+_closest, _scanidx+_closest+1, (_total-_closest+1)*sizeof(msgn_t)); + } --_total; - if(_total != _pos) - memmove(_scanidx+_pos, _scanidx+_pos+1, (_total-_pos)*sizeof(msgn_t)); } } else { - if(_scanidx[_closest] != __hdridx) { - ++_closest; - if(_closest != _total) - memmove(_scanidx+_closest+1, _scanidx+_closest, (_total-_closest+1)*sizeof(msgn_t)); - _scanidx[_closest] = __hdridx; - ++_total; + if(_total) { + if(_scanidx[_closest] != __hdridx) { + if(_scanidx[_closest] < __hdridx) + _closest++; + if(_closest != _total) + memmove(_scanidx+_closest+1, _scanidx+_closest, (_total-_closest)*sizeof(msgn_t)); + ++_total; + } } + else + ++_total; + _scanidx[_closest++] = __hdridx; } // Write the changed scanning file from scratch