From 53d11a6bce3850d936920e96a710d11de149e005 Mon Sep 17 00:00:00 2001 From: "Alexander S. Aganichev" Date: Wed, 7 Aug 2002 07:21:41 +0000 Subject: [PATCH] Fix duplication of AREASEP and packing of *.msg bases --- docs/notework.txt | 5 +++++ golded3/gcarea.cpp | 14 +++++++++++--- goldlib/gmb3/gmofido1.cpp | 11 +++++++++-- goldlib/gmb3/gmofido2.cpp | 11 +++++++++-- 4 files changed, 34 insertions(+), 7 deletions(-) diff --git a/docs/notework.txt b/docs/notework.txt index e035bf0..2d551be 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -12,6 +12,11 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ +! If two AreaSep have the same echotag then they will appear only + once. + +- Fixed handling of packed *.msg style messagebases. + - Fixed invalid charset kludge in crossposted messages. - Fixed handling of 0xe1 character in CP437 (require liblocal 0.2 diff --git a/golded3/gcarea.cpp b/golded3/gcarea.cpp index 9a1f90f..ddbde29 100644 --- a/golded3/gcarea.cpp +++ b/golded3/gcarea.cpp @@ -286,13 +286,21 @@ void AreaList::AddNewArea(AreaCfg* aa) { area_iterator ap; for(ap = idx.begin(); ap != idx.end(); ap++) { ++_currarea; - if(not (*ap)->isseparator()) { - int eq_echoid = strieql(aa->echoid, (*ap)->echoid()); + int eq_echoid = strieql(aa->echoid, (*ap)->echoid()); + if(eq_echoid) { + newarea = false; + if(not (*ap)->isseparator()) { + if(strblank((*ap)->desc())) + strxcpy(desc, aa->desc, sizeof(desc)); + } + break; + } + else if(not (*ap)->isseparator()) { int eq_path = strieql(aa->path, (*ap)->path()); int eq_board = (aa->board == (*ap)->board()); int eq_msgbase = (aa->msgbase == (*ap)->msgbase()); int eq_isfido = (aa->isfido() and (*ap)->isfido()); - if(eq_echoid or (eq_path and eq_board and (eq_msgbase or eq_isfido))) { + if(eq_path and eq_board and (eq_msgbase or eq_isfido)) { // We had it already, so override with the new data newarea = false; if(strblank((*ap)->desc())) diff --git a/goldlib/gmb3/gmofido1.cpp b/goldlib/gmb3/gmofido1.cpp index 90dcd84..ebc09c4 100644 --- a/goldlib/gmb3/gmofido1.cpp +++ b/goldlib/gmb3/gmofido1.cpp @@ -172,10 +172,17 @@ void FidoArea::open() { if(isopen == 1) { if(ispacked()) { isopen--; - const char* newpath = Unpack(path()); + Path tmp; + strxcpy(tmp, path(), sizeof(Path)); + StripBackslash(tmp); + const char* newpath = Unpack(tmp); if(newpath == NULL) packed(false); - set_real_path(newpath ? newpath : path()); + else { + strcpy(tmp, newpath); + AddBackslash(tmp); + } + set_real_path(newpath ? tmp : path()); isopen++; } data_open(); diff --git a/goldlib/gmb3/gmofido2.cpp b/goldlib/gmb3/gmofido2.cpp index 9941185..1a06181 100644 --- a/goldlib/gmb3/gmofido2.cpp +++ b/goldlib/gmb3/gmofido2.cpp @@ -41,10 +41,17 @@ void FidoArea::raw_scan(bool __scanpm) { if(not _wasopen) { isopen++; if(ispacked()) { - const char* newpath = Unpack(path()); + Path tmp; + strxcpy(tmp, path(), sizeof(Path)); + StripBackslash(tmp); + const char* newpath = Unpack(tmp); if(newpath == NULL) packed(false); - set_real_path(newpath ? newpath : path()); + else { + strcpy(tmp, newpath); + AddBackslash(tmp); + } + set_real_path(newpath ? tmp : path()); } }