diff --git a/docs/notework.txt b/docs/notework.txt index 63f7f18..94534b9 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -12,6 +12,13 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, December xx 2000 ______________________________________________________________________ ++ 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 + random system groups. + +- Fixed page wrapping in help window. + - Added some improvements for better charset handling. - Fixed decoding of MIME-encoded From and To fields. diff --git a/golded3/gccfgg.cpp b/golded3/gccfgg.cpp index 30308c1..1db9a87 100644 --- a/golded3/gccfgg.cpp +++ b/golded3/gccfgg.cpp @@ -647,6 +647,7 @@ CfgGed::CfgGed() { *printreset = 0; *quotechars = 0; strcpy(quotestring, " FL> "); + strcpy(quotestops, "<\"\'-"); *searchfor = 0; strcpy(stylecodepunct, " !?\"$%&()+,.:;<=>@[\\]^`{|}~\n\r\t"); *stylecodestops = 0; diff --git a/golded3/gccfgg.h b/golded3/gccfgg.h index 0cdb39d..2076cb0 100644 --- a/golded3/gccfgg.h +++ b/golded3/gccfgg.h @@ -288,6 +288,7 @@ const word CRC_QUOTECTRL = 0x4CC7; const word CRC_QUOTEMARGIN = 0x13E6; const word CRC_QUOTESPACING = 0xB403; const word CRC_QUOTESTRING = 0xE44F; +const word CRC_QUOTESTOPS = 0xD2E4; const word CRC_QUOTEWRAPHARD = 0x6BD4; const word CRC_QWKBADMSGS = 0x0C2D; const word CRC_QWKCONFMAP = 0xEAE1; diff --git a/golded3/gccfgg0.cpp b/golded3/gccfgg0.cpp index 2573e5b..582d0f0 100644 --- a/golded3/gccfgg0.cpp +++ b/golded3/gccfgg0.cpp @@ -472,6 +472,7 @@ SwitchQ: case CRC_QUOTECTRL : CfgQuotectrl (); break; case CRC_QUOTEMARGIN : CfgQuotemargin (); break; case CRC_QUOTESTRING : CfgQuotestring (); break; + case CRC_QUOTESTOPS : CfgQuotestops (); break; case CRC_QUOTEWRAPHARD : CfgQuotewraphard (); break; case CRC_QWKBADMSGS : CfgQwkbadmsgs (); break; case CRC_QWKCONFMAP : CfgQwkconfmap (); break; diff --git a/golded3/gccfgg7.cpp b/golded3/gccfgg7.cpp index a337d9b..2a5ca80 100644 --- a/golded3/gccfgg7.cpp +++ b/golded3/gccfgg7.cpp @@ -53,6 +53,24 @@ void CfgQuotestring() { // ------------------------------------------------------------------ +void CfgQuotestops() { + + char buf[10]; + strxcpy(buf, StripQuotes(val), sizeof(buf)); + if(*buf == NUL) + strcpy(buf, " > "); + else { + if(buf[strlen(buf)-1] != ' ') + strcat(buf, " "); + } + if(cfgingroup) + CFG->grp.AddItm(GRP_QUOTESTOPS, buf, strlen(buf)+1); + else + strcpy(CFG->quotestops, buf); +} + +// ------------------------------------------------------------------ + void CfgQuotewraphard() { bool flag = GetYesno(val); diff --git a/golded3/gckeys.cpp b/golded3/gckeys.cpp index b555e58..b10180f 100644 --- a/golded3/gckeys.cpp +++ b/golded3/gckeys.cpp @@ -700,8 +700,8 @@ tglobalkey globalkeys[] = { { CRC_READDECREASEMARGIN , KK_ReadDecreaseMargin , KT_R }, // 0xD8EA { CRC_LISTASKEXIT , KK_ListAskExit , KT_M }, // 0xD922 { CRC_AREACATCHUP , KK_AreaCatchUp , KT_A }, // 0xDA5C - { CRC_READGOTOREPLYPREV , KK_ReadGotoReplyPrev , KT_R }, // 0xDBE7 { CRC_READMOVEDIRQUOTEMSG , KK_ReadMoveDirQuoteMsg , KT_R }, // 0xDBC0 + { CRC_READGOTOREPLYPREV , KK_ReadGotoReplyPrev , KT_R }, // 0xDBE7 { CRC_EDITANCHOR , KK_EditAnchor , KT_E }, // 0xDC07 { CRC_FILEQUITNOW , KK_FileQuitNow , KT_F }, // 0xDD19 { CRC_AREAINFO , KK_AreaInfo , KT_A }, // 0xDE54 diff --git a/golded3/gcprot.h b/golded3/gcprot.h index a440792..cfaf8de 100644 --- a/golded3/gcprot.h +++ b/golded3/gcprot.h @@ -279,6 +279,7 @@ void CfgQuotechars (); void CfgQuotemargin (); void CfgQuotespacing (); void CfgQuotestring (); +void CfgQuotestops (); void CfgQuotewraphard (); void CfgQwkbadmsgs (); void CfgQwkconfmap (); diff --git a/golded3/gecfgg.h b/golded3/gecfgg.h index 059deeb..8d9980e 100644 --- a/golded3/gecfgg.h +++ b/golded3/gecfgg.h @@ -287,6 +287,7 @@ public: uint quotectrl; int quotemargin; char quotestring[10]; + char quotestops[41]; bool quotewraphard; int ra2usersbbs; // RA2; int replylink; diff --git a/golded3/gerand.cpp b/golded3/gerand.cpp index bc3ef49..0fa9b34 100644 --- a/golded3/gerand.cpp +++ b/golded3/gerand.cpp @@ -155,6 +155,7 @@ void Area::InitData() { strcpy(adat->quotechars, CFG->quotechars); adat->quotectrl = CFG->quotectrl; strcpy(adat->quotestring, CFG->quotestring); + strcpy(adat->quotestops, CFG->quotestops); adat->quotewraphard = CFG->quotewraphard; adat->replyre = EDIT->ReplyRe(); if(*CFG->searchfor) @@ -278,6 +279,8 @@ void Area::RandomizeData(int mode) { CFG->grp.GetItm(GRP_QUOTECHARS, adat->quotechars, sizeof(adat->quotechars)); CFG->grp.GetItm(GRP_QUOTECTRL, adat->quotectrl); CFG->grp.GetItm(GRP_QUOTESTRING, adat->quotestring, sizeof(adat->quotestring)); + CFG->grp.GetItm(GRP_QUOTESTOPS, adat->quotestops, sizeof(adat->quotestops)); + CFG->grp.GetItm(GRP_QUOTEWRAPHARD, adat->quotewraphard); if(CFG->grp.GetItm(GRP_PLAY, buf, sizeof(buf))) { diff --git a/golded3/geutil.cpp b/golded3/geutil.cpp index 750221e..af4beb3 100644 --- a/golded3/geutil.cpp +++ b/golded3/geutil.cpp @@ -325,7 +325,7 @@ int is_quote(const char* ptr) { if(spaces > 1) return false; } - else if((*ptr < ' ') or strchr("<\"\'-", *ptr)) { + else if((*ptr < ' ') or strchr(AA->Quotestops(), *ptr)) { // Found a char that cannot occur in a quotestring return false; } diff --git a/golded3/gmarea.h b/golded3/gmarea.h index f66c078..a98a062 100644 --- a/golded3/gmarea.h +++ b/golded3/gmarea.h @@ -298,6 +298,7 @@ struct AreaData { char quotechars[11]; int quotectrl; char quotestring[10]; + char quotestops[41]; bool quotewraphard; GPlay play; int replyre; @@ -551,6 +552,7 @@ public: const char* Quotechars() const { return adat->quotechars; } int Quotectrl() const { return adat->quotectrl; } const char* Quotestring() const { return adat->quotestring; } + const char* Quotestops() const { return adat->quotestops; } bool Quotewraphard() const { return adat->quotewraphard; } const GPlay& Play() const { return adat->play; } const int Replyre() const { return adat->replyre; } diff --git a/goldlib/gall/gutlgrp.h b/goldlib/gall/gutlgrp.h index 75deede..1081ec0 100644 --- a/goldlib/gall/gutlgrp.h +++ b/goldlib/gall/gutlgrp.h @@ -83,6 +83,7 @@ enum { GRP_QUOTECHARS, GRP_QUOTECTRL, GRP_QUOTESTRING, + GRP_QUOTESTOPS, GRP_QUOTEWRAPHARD, GRP_SEARCHFOR, GRP_TAGLINE, diff --git a/goldlib/gall/gwinhlp1.cpp b/goldlib/gall/gwinhlp1.cpp index ab2248c..36e2b8b 100644 --- a/goldlib/gall/gwinhlp1.cpp +++ b/goldlib/gall/gwinhlp1.cpp @@ -223,8 +223,10 @@ static int find_page(long startpos, int pageofs) { break; } if(strnieql(buf, "*P", 2)) { - lastpagepos=currpos; - currpage++; + if(lines != whelp.srow+1) { + lastpagepos=currpos; + currpage++; + } lines = whelp.srow; } else if(lines == whelp.erow-1) { @@ -268,8 +270,16 @@ static void disp_cat() { // if end-of-file or "*E" was found, assume end-of-category end = strnieql(buf,"*E",2) ? YES : NO; + bool pagebreak = false; + if(strnieql(buf,"*P",2)) { + if(wrow != whelp.srow) + pagebreak = true; + else + continue; + } + // if end-of-category or new-page specified - if((wrow > whelp.erow-1) or strnieql(buf,"*P",2) or end) { + if((wrow > whelp.erow-1) or pagebreak or end) { loop: ////////////////////////////////