Various fixes. See notework.txt
This commit is contained in:
parent
07782be14d
commit
f1ab267ad1
@ -12,6 +12,22 @@ ______________________________________________________________________
|
||||
Notes for GoldED+ 1.1.5, /snapshot/
|
||||
______________________________________________________________________
|
||||
|
||||
- Fixed serious bug with forwarding when ADDRESSLOOKUPFIRST set to
|
||||
MSGID (or no Origin line available) and you call either spellchecker
|
||||
or EditLoadFile function. The address was set to the address of
|
||||
original mail author.
|
||||
|
||||
+ Added USEAREA keyword which may be used in Random System Groups. If
|
||||
defined to NO then GoldED+ will not recognize AREA kludge.
|
||||
|
||||
! If USEFWD is set to NO then GoldED+ will not recognize FWD* kludges.
|
||||
|
||||
- You may now disable one or more stylecodes by including them in
|
||||
STYLECODESTOPS.
|
||||
|
||||
- Fixed hang on undo of text deletetion when text is greater than
|
||||
screen size.
|
||||
|
||||
- Fixed crash on calling Externutil in empty area.
|
||||
|
||||
- GoldED+ will now treat all unknown charsets to be equal to
|
||||
|
@ -296,7 +296,7 @@ void AreaList::AddNewArea(AreaCfg* aa) {
|
||||
// We had it already, so override with the new data
|
||||
newarea = false;
|
||||
if(strblank((*ap)->desc()))
|
||||
strcpy(desc, aa->desc);
|
||||
strxcpy(desc, aa->desc, sizeof(desc));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -749,8 +749,9 @@ CfgGed::CfgGed() {
|
||||
templatematch = false;
|
||||
timeout = 0;
|
||||
twitmode = TWIT_BLANK;
|
||||
usearea = true;
|
||||
usecharset = true;
|
||||
usefwd = false;
|
||||
usefwd = NO;
|
||||
useintl = true;
|
||||
usepid = true;
|
||||
usernameno = 0;
|
||||
|
@ -359,6 +359,7 @@ const word CRC_TWITMODE = 0x9DC8;
|
||||
const word CRC_TWITNAME = 0x2055;
|
||||
const word CRC_TWITSUBJ = 0x08C0;
|
||||
const word CRC_TWITTO = 0x9DFE;
|
||||
const word CRC_USEAREA = 0x2FD4;
|
||||
const word CRC_USECHARSET = 0xE1B9;
|
||||
const word CRC_USEFLAGS = 0xE2B6;
|
||||
const word CRC_USEFWD = 0x439F;
|
||||
|
@ -555,6 +555,7 @@ SwitchT:
|
||||
|
||||
SwitchU:
|
||||
switch(crc) {
|
||||
case CRC_USEAREA : CfgUsearea (); break;
|
||||
case CRC_USECHARSET : CfgUsecharset (); break;
|
||||
case CRC_USEFWD : CfgUsefwd (); break;
|
||||
case CRC_USEINTL : CfgUseintl (); break;
|
||||
|
@ -274,6 +274,17 @@ void CfgTwitsubj() {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void CfgUsearea() {
|
||||
|
||||
int flag = GetYesno(val) ? true : false;
|
||||
if(cfgingroup)
|
||||
CFG->grp.AddItm(GRP_USEAREA, flag);
|
||||
else
|
||||
CFG->usearea = flag;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void CfgUsecharset() {
|
||||
|
||||
CFG->usecharset = GetYesno(val);
|
||||
|
@ -341,6 +341,7 @@ void CfgTwitmode ();
|
||||
void CfgTwitname ();
|
||||
void CfgTwitsubj ();
|
||||
void CfgTwitto ();
|
||||
void CfgUsearea ();
|
||||
void CfgUsecharset ();
|
||||
void CfgUseflags ();
|
||||
void CfgUsefwd ();
|
||||
|
@ -336,6 +336,7 @@ public:
|
||||
int twitmode; // showtwits;
|
||||
std::vector<Node> twitname;
|
||||
gstrarray twitsubj;
|
||||
bool usearea;
|
||||
bool usecharset;
|
||||
int usefwd;
|
||||
bool useintl;
|
||||
|
@ -41,7 +41,12 @@ bool strncont(const char *beginword, const char *stylestopchars, int n)
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
inline int isstylechar(char c) { return (c == '*') or (c == '/') or (c == '_') or (c == '#'); }
|
||||
inline bool isstylechar(char c) {
|
||||
|
||||
if(strchr(CFG->stylecodestops, c) != NULL)
|
||||
return false;
|
||||
return (c == '*') or (c == '/') or (c == '_') or (c == '#');
|
||||
}
|
||||
|
||||
void Container::StyleCodeHighlight(const char* text, int row, int col, bool dohide, int color) {
|
||||
|
||||
|
@ -2699,18 +2699,18 @@ void UndoStack::PlayItem() {
|
||||
|
||||
// we need to fit thisrow into the screen boundaries
|
||||
if(delta > 0) {
|
||||
for (row -= delta; row < minrow; row++) {
|
||||
for (row -= delta; (int)row < (int)minrow; row++) {
|
||||
if(templine) // cause refresh() issue an error since templine should never be NULL
|
||||
templine = templine->next;
|
||||
}
|
||||
temprow = maxrow;
|
||||
temprow = minrow;
|
||||
}
|
||||
else {
|
||||
for (row -= delta; row > maxrow; row--) {
|
||||
if(templine) // cause refresh() issue an error since templine should never be NULL
|
||||
templine = templine->prev;
|
||||
}
|
||||
temprow = minrow;
|
||||
temprow = maxrow;
|
||||
}
|
||||
|
||||
// move pointer to the top of screen so we refresh scrolled area
|
||||
|
@ -458,9 +458,11 @@ char* strxmimecpy(char* dest, const char* source, int level, int size, bool dete
|
||||
|
||||
static void KludgeAREA(GMsg* msg, const char* echoid) {
|
||||
|
||||
Area* ap = AL.AreaEchoToPtr(echoid);
|
||||
if(ap)
|
||||
msg->areakludgeid = ap->echoid();
|
||||
if(AA->Usearea()) {
|
||||
Area* ap = AL.AreaEchoToPtr(echoid);
|
||||
if(ap)
|
||||
msg->areakludgeid = ap->echoid();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -815,7 +817,8 @@ static void KludgeX_FTN_TO(GMsg* msg, const char* ptr) {
|
||||
|
||||
static void KludgeFWDFROM(GMsg* msg, const char* ptr) {
|
||||
|
||||
strxcpy(msg->fwdfrom, ptr, sizeof(msg->fwdfrom));
|
||||
if(AA->Usefwd())
|
||||
strxcpy(msg->fwdfrom, ptr, sizeof(msg->fwdfrom));
|
||||
}
|
||||
|
||||
|
||||
@ -823,7 +826,8 @@ static void KludgeFWDFROM(GMsg* msg, const char* ptr) {
|
||||
|
||||
static void KludgeFWDORIG(GMsg* msg, const char* ptr) {
|
||||
|
||||
msg->fwdorig.reset(ptr);
|
||||
if(AA->Usefwd())
|
||||
msg->fwdorig.reset(ptr);
|
||||
}
|
||||
|
||||
|
||||
@ -831,7 +835,8 @@ static void KludgeFWDORIG(GMsg* msg, const char* ptr) {
|
||||
|
||||
static void KludgeFWDTO(GMsg* msg, const char* ptr) {
|
||||
|
||||
strxcpy(msg->fwdto, ptr, sizeof(msg->fwdto));
|
||||
if(AA->Usefwd())
|
||||
strxcpy(msg->fwdto, ptr, sizeof(msg->fwdto));
|
||||
}
|
||||
|
||||
|
||||
@ -839,7 +844,8 @@ static void KludgeFWDTO(GMsg* msg, const char* ptr) {
|
||||
|
||||
static void KludgeFWDDEST(GMsg* msg, const char* ptr) {
|
||||
|
||||
msg->fwddest.reset(ptr);
|
||||
if(AA->Usefwd())
|
||||
msg->fwddest.reset(ptr);
|
||||
}
|
||||
|
||||
|
||||
@ -847,7 +853,8 @@ static void KludgeFWDDEST(GMsg* msg, const char* ptr) {
|
||||
|
||||
static void KludgeFWDSUBJ(GMsg* msg, const char* ptr) {
|
||||
|
||||
strxcpy(msg->fwdsubj, ptr, sizeof(msg->fwdsubj));
|
||||
if(AA->Usefwd())
|
||||
strxcpy(msg->fwdsubj, ptr, sizeof(msg->fwdsubj));
|
||||
}
|
||||
|
||||
|
||||
@ -855,7 +862,8 @@ static void KludgeFWDSUBJ(GMsg* msg, const char* ptr) {
|
||||
|
||||
static void KludgeFWDAREA(GMsg* msg, const char* ptr) {
|
||||
|
||||
strxcpy(msg->fwdarea, ptr, sizeof(msg->fwdarea));
|
||||
if(AA->Usefwd())
|
||||
strxcpy(msg->fwdarea, ptr, sizeof(msg->fwdarea));
|
||||
}
|
||||
|
||||
|
||||
@ -863,7 +871,8 @@ static void KludgeFWDAREA(GMsg* msg, const char* ptr) {
|
||||
|
||||
static void KludgeFWDMSGID(GMsg* msg, const char* ptr) {
|
||||
|
||||
strxcpy(msg->fwdmsgid, ptr, sizeof(msg->fwdmsgid));
|
||||
if(AA->Usefwd())
|
||||
strxcpy(msg->fwdmsgid, ptr, sizeof(msg->fwdmsgid));
|
||||
}
|
||||
|
||||
|
||||
@ -1462,9 +1471,7 @@ void ScanKludges(GMsg* msg, int getvalue) {
|
||||
line->type |= GLINE_KLUD;
|
||||
const char* areakludgeptr = ptr+5; // Extract echoid from kludge
|
||||
areakludgeptr = strskip_wht(areakludgeptr);
|
||||
Area* ap = AL.AreaEchoToPtr(areakludgeptr);
|
||||
if(ap)
|
||||
msg->areakludgeid = ap->echoid();
|
||||
KludgeAREA(msg, areakludgeptr);
|
||||
}
|
||||
|
||||
if(not (line->type & GLINE_KLUD)) {
|
||||
|
@ -90,13 +90,6 @@ int Area::LoadMsg(GMsg* msg, ulong msgno, int margin, int mode) {
|
||||
if(not (msg->attr.uns() and not msg->attr.rcv()))
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
// We can't rely on the destination address unless we are in netmail
|
||||
if(not AA->isnet()) {
|
||||
msg->dest.reset_fast();
|
||||
msg->odest.reset_fast();
|
||||
}
|
||||
}
|
||||
msg->attr.tou0();
|
||||
msg->TextToLines(margin);
|
||||
return true;
|
||||
|
@ -25,6 +25,7 @@
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
#include <golded.h>
|
||||
#include <gcharset.h>
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
@ -732,7 +733,7 @@ void GThreadlist::GenTree(char* buf, int idx) {
|
||||
|
||||
if(graph[0] == NUL) {
|
||||
int table = LoadCharset(NULL, NULL, 1);
|
||||
int level = LoadCharset("IBMPC", CFG->xlatlocalset);
|
||||
int level = LoadCharset(get_dos_charset(CFG->xlatlocalset), CFG->xlatlocalset);
|
||||
XlatStr(graph, graph_ibmpc, level, CharTable);
|
||||
if(table == -1)
|
||||
LoadCharset(CFG->xlatimport, CFG->xlatlocalset);
|
||||
|
@ -763,6 +763,7 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
|
||||
msg->references = NULL;
|
||||
msg->attr.tou0();
|
||||
msg->TextToLines(CFG->dispmargin-1, false);
|
||||
msg->msgid.reset();
|
||||
*msg->iorig = NUL;
|
||||
*msg->idest = NUL;
|
||||
*msg->ireplyto = NUL;
|
||||
|
@ -168,6 +168,7 @@ void Area::InitData() {
|
||||
strxcpy(adat->wtpl, CFG->wtpl.c_str(), sizeof(adat->wtpl));
|
||||
adat->templatematch = CFG->templatematch;
|
||||
adat->twitmode = CFG->twitmode;
|
||||
adat->usearea = CFG->usearea;
|
||||
adat->usefwd = CFG->usefwd;
|
||||
strcpy(adat->username.name, CFG->username.empty() ? "" : CFG->username[CFG->usernameno].name);
|
||||
adat->username.addr = adat->aka.addr;
|
||||
@ -319,6 +320,7 @@ void Area::RandomizeData(int mode) {
|
||||
|
||||
CFG->grp.GetItm(GRP_TEMPLATEMATCH, adat->templatematch);
|
||||
CFG->grp.GetItm(GRP_TWITMODE, adat->twitmode);
|
||||
CFG->grp.GetItm(GRP_USEAREA, adat->usearea);
|
||||
CFG->grp.GetItm(GRP_USEFWD, adat->usefwd);
|
||||
|
||||
if(CFG->grp.GetItm(GRP_USERNAME, buf, sizeof(buf))) {
|
||||
|
@ -1015,11 +1015,11 @@ void OtherAreaReplyMsg() {
|
||||
void ReplyMsg() {
|
||||
|
||||
if(CurrArea == OrigArea) {
|
||||
const char *destarea = AA->Areareplyto();
|
||||
if (!*destarea)
|
||||
destarea = reader_msg->areakludgeid;
|
||||
const char *destarea = reader_msg->areakludgeid;
|
||||
if ((destarea != NULL) and (*destarea != NUL))
|
||||
destarea = AA->Areareplyto();
|
||||
|
||||
if(AA->Areareplydirect() and destarea) {
|
||||
if(AA->Areareplydirect() and (destarea != NULL)) {
|
||||
int a = AL.AreaEchoToNo(destarea);
|
||||
if(a != -1) {
|
||||
CurrArea = AL.AreaNoToId(a);
|
||||
@ -1051,11 +1051,11 @@ void ReplyMsg() {
|
||||
void QuoteMsg(bool ignore_replyto) {
|
||||
|
||||
if(CurrArea == OrigArea) {
|
||||
const char *destarea = AA->Areareplyto();
|
||||
if (!*destarea)
|
||||
destarea = reader_msg->areakludgeid;
|
||||
const char *destarea = reader_msg->areakludgeid;
|
||||
if ((destarea != NULL) and (*destarea != NUL))
|
||||
destarea = AA->Areareplyto();
|
||||
|
||||
if(AA->Areareplydirect() and destarea) {
|
||||
if(AA->Areareplydirect() and (destarea != NULL)) {
|
||||
int a = AL.AreaEchoToNo(destarea);
|
||||
if(a != -1) {
|
||||
CurrArea = AL.AreaNoToId(a);
|
||||
@ -1087,11 +1087,11 @@ void QuoteMsg(bool ignore_replyto) {
|
||||
void CommentMsg() {
|
||||
|
||||
if(CurrArea == OrigArea) {
|
||||
const char *destarea = AA->Areareplyto();
|
||||
if (!*destarea)
|
||||
destarea = reader_msg->areakludgeid;
|
||||
const char *destarea = reader_msg->areakludgeid;
|
||||
if ((destarea != NULL) and (*destarea != NUL))
|
||||
destarea = AA->Areareplyto();
|
||||
|
||||
if(AA->Areareplydirect() && destarea) {
|
||||
if(AA->Areareplydirect() and (destarea != NULL)) {
|
||||
int a = AL.AreaEchoToNo(destarea);
|
||||
if(a != -1) {
|
||||
CurrArea = AL.AreaNoToId(a);
|
||||
|
@ -306,6 +306,7 @@ struct AreaData {
|
||||
Tear tearline;
|
||||
Path tpl;
|
||||
bool templatematch;
|
||||
bool usearea;
|
||||
int usefwd;
|
||||
Node username;
|
||||
bool usetzutc;
|
||||
@ -564,6 +565,7 @@ public:
|
||||
const char* Tpl() const { return adat->tpl; }
|
||||
bool Templatematch() const { return adat->templatematch; }
|
||||
int Twitmode() const { return adat->twitmode; }
|
||||
bool Usearea() const { return adat->usearea; }
|
||||
int Usefwd() const { return adat->usefwd; }
|
||||
const Node& Username() const { return adat->username; }
|
||||
bool Usetzutc() const { return adat->usetzutc; }
|
||||
|
@ -81,8 +81,10 @@ const char *get_charset(void)
|
||||
strcpy(charsetbuf, "LATIN-1");
|
||||
cp = setlocale(LC_CTYPE, "");
|
||||
if((cp != NULL) and ((cp = strchr(cp, '.')) != NULL)) {
|
||||
if(strieql(cp, "KOI8R"))
|
||||
if(strieql(cp, "KOI8R") or strieql(cp, "KOI8"))
|
||||
cp = "KOI8-R";
|
||||
if(strieql(cp, "KOI8U"))
|
||||
cp = "KOI8-U";
|
||||
strxcpy(charsetbuf, cp, sizeof(charsetbuf));
|
||||
}
|
||||
#endif
|
||||
@ -99,7 +101,9 @@ const char *get_dos_charset(const char *cpfrom)
|
||||
char *from, *to;
|
||||
} cpmap[] = {
|
||||
{ "LATIN-1", "CP437" },
|
||||
{ "KOI8", "CP866" },
|
||||
{ "KOI8-R", "CP866" },
|
||||
{ "KOI8-U", "CP1125" },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
@ -704,9 +704,17 @@ int gkbd_curstable[] = {
|
||||
int gkbd_cursgetch(int mode) {
|
||||
|
||||
int key;
|
||||
#ifndef BUGGY_NCURSES
|
||||
nodelay(stdscr, mode);
|
||||
#else
|
||||
wtimeout(stdscr, mode ? 0 : -1);
|
||||
#endif
|
||||
key = getch();
|
||||
#ifndef BUGGY_NCURSES
|
||||
nodelay(stdscr, FALSE);
|
||||
#else
|
||||
wtimeout(stdscr, -1);
|
||||
#endif
|
||||
|
||||
return key;
|
||||
}
|
||||
|
@ -93,6 +93,7 @@ enum {
|
||||
GRP_TEMPLATE,
|
||||
GRP_TEMPLATEMATCH,
|
||||
GRP_TWITMODE,
|
||||
GRP_USEAREA,
|
||||
GRP_USEFWD,
|
||||
GRP_USERNAME,
|
||||
GRP_USETZUTC,
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
const int MAX_DESC = 45; // Area descriptions
|
||||
const int MAX_DESC = 81; // Area descriptions
|
||||
const int MAX_ECHO = 81; // Echoids
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user