various fixes
This commit is contained in:
parent
7e11b3eb70
commit
0d12457466
@ -14,6 +14,10 @@ To compile GoldED+ and utilities you'll need:
|
|||||||
--- MINGW ONLY ---
|
--- MINGW ONLY ---
|
||||||
Please consult this howto on installing MinGW over Cygwin:
|
Please consult this howto on installing MinGW over Cygwin:
|
||||||
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/mno-cygwin-howto.txt
|
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/mno-cygwin-howto.txt
|
||||||
|
--- gcc-2.95.3-5.tar.bz2 + mingw-runtime-1.3-2.tar.bz2 ---
|
||||||
|
Move /usr/include/mingw to /usr/local/include/mingw, take gcc-2.95.3-xxx.tar.gz
|
||||||
|
from www.mingw.org, copy .../lib/stdlibc++.a to /usr/local/lib/mingw, copy
|
||||||
|
.../include/g++-3 to /usr/local/include/mingw/g++-3.
|
||||||
------ COMMON ------
|
------ COMMON ------
|
||||||
|
|
||||||
First, edit GNUmakef.def for the preferrable compilation options.
|
First, edit GNUmakef.def for the preferrable compilation options.
|
||||||
|
@ -12,6 +12,17 @@ ______________________________________________________________________
|
|||||||
Notes for GoldED+ 1.1.5, /snapshot/
|
Notes for GoldED+ 1.1.5, /snapshot/
|
||||||
______________________________________________________________________
|
______________________________________________________________________
|
||||||
|
|
||||||
|
- Fixed reverse order sorting in 'M' criteria of AREALISTSORT (broken
|
||||||
|
in previous snapshots).
|
||||||
|
|
||||||
|
- Fixed bug with quoting if text goes right after long kludge.
|
||||||
|
|
||||||
|
- Fixed invalid message encoding after calling externutil. There's
|
||||||
|
still a bug left if you call externutil when kludges are shown and
|
||||||
|
-Reload option is specifyed to externutil.
|
||||||
|
|
||||||
|
- Fixed replying on gated message to internet area.
|
||||||
|
|
||||||
- Fixed crash on long names in TwitName.
|
- Fixed crash on long names in TwitName.
|
||||||
|
|
||||||
- Fixed net/echomail.bss updating in Hudson/GoldBase.
|
- Fixed net/echomail.bss updating in Hudson/GoldBase.
|
||||||
|
@ -166,7 +166,7 @@ extern "C" int AreaListCmp(const Area** __a, const Area** __b) {
|
|||||||
if(A->ismarked())
|
if(A->ismarked())
|
||||||
return sepfirst?1:-1;
|
return sepfirst?1:-1;
|
||||||
}
|
}
|
||||||
else if((cmp = compare_two(A->ismarked(), B->ismarked())) != 0)
|
else if((cmp = compare_two(B->ismarked(), A->ismarked())) != 0)
|
||||||
return cmp;
|
return cmp;
|
||||||
break;
|
break;
|
||||||
case 'P':
|
case 'P':
|
||||||
|
@ -58,6 +58,7 @@ void SaveLines(int mode, const char* savefile, GMsg* msg, int margin, bool clip)
|
|||||||
}
|
}
|
||||||
int lines=0;
|
int lines=0;
|
||||||
if(prnfp) {
|
if(prnfp) {
|
||||||
|
char *old_msg_txt = throw_strdup(msg->txt);
|
||||||
#ifdef OLD_STYLE_HEADER
|
#ifdef OLD_STYLE_HEADER
|
||||||
if(mode == MODE_WRITE) {
|
if(mode == MODE_WRITE) {
|
||||||
if(prnheader) {
|
if(prnheader) {
|
||||||
@ -134,6 +135,8 @@ void SaveLines(int mode, const char* savefile, GMsg* msg, int margin, bool clip)
|
|||||||
fclose(prnfp);
|
fclose(prnfp);
|
||||||
prnfp = NULL;
|
prnfp = NULL;
|
||||||
}
|
}
|
||||||
|
throw_release(msg->txt);
|
||||||
|
msg->txt = old_msg_txt;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
char buf[256];
|
char buf[256];
|
||||||
|
@ -1525,10 +1525,10 @@ void ScanKludges(GMsg* msg, int getvalue) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if it's a tearline
|
// Check if it's a tearline
|
||||||
else if(not (gottear or gottag) and strneql("---", ptr, 3) and (ptr[3] == ' ' or ptr[3] == NUL)) {
|
else if(not (gottear or gottag) and strneql("---", ptr, 3) and (ptr[3] == ' ' or ptr[3] == NUL)) {
|
||||||
|
|
||||||
Line* nnel = next_non_empty(line->next);
|
Line* nnel = next_non_empty(line->next);
|
||||||
if(not lineno or ((lineno-1) == originlineno) or not nnel or nnel->type & GLINE_KLUDGE) {
|
if(not lineno or ((lineno-1) == originlineno) or not nnel or nnel->type & GLINE_KLUDGE) {
|
||||||
// Found Tearline
|
// Found Tearline
|
||||||
gottear = YES;
|
gottear = YES;
|
||||||
tearlineno = lineno;
|
tearlineno = lineno;
|
||||||
@ -1536,7 +1536,7 @@ void ScanKludges(GMsg* msg, int getvalue) {
|
|||||||
line->color = C_READT;
|
line->color = C_READT;
|
||||||
strbtrim(strcpy(msg->tearline, ptr+3));
|
strbtrim(strcpy(msg->tearline, ptr+3));
|
||||||
|
|
||||||
if(getvalue and CFG->gedhandshake) {
|
if(getvalue and CFG->gedhandshake) {
|
||||||
char* tearid[] = {
|
char* tearid[] = {
|
||||||
"GoldED",
|
"GoldED",
|
||||||
" GED ",
|
" GED ",
|
||||||
@ -1562,18 +1562,18 @@ void ScanKludges(GMsg* msg, int getvalue) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if it's an originline
|
// Check if it's an originline
|
||||||
else if(not (gotorig or gottear or gottag) and strneql(" * Origin: ", ptr, 11)) {
|
else if(not (gotorig or gottear or gottag) and strneql(" * Origin: ", ptr, 11)) {
|
||||||
|
|
||||||
// Found Origin line
|
// Found Origin line
|
||||||
bool cnd = line->next != NULL;
|
bool cnd = line->next != NULL;
|
||||||
Line* nnel = next_non_empty(line->next);
|
Line* nnel = next_non_empty(line->next);
|
||||||
bool nextkl = cnd ? not nnel or nnel->type & GLINE_KLUDGE : false;
|
bool nextkl = cnd ? not nnel or nnel->type & GLINE_KLUDGE : false;
|
||||||
nnel = cnd ? next_non_empty(line->next->next) : NULL;
|
nnel = cnd ? next_non_empty(line->next->next) : NULL;
|
||||||
bool nextor = cnd ? (not nnel or nnel->type & GLINE_KLUDGE) and (line->next->txt.find(/*(*/')') != line->next->txt.npos) : false;
|
bool nextor = cnd ? (not nnel or nnel->type & GLINE_KLUDGE) and (line->next->txt.find(/*(*/')') != line->next->txt.npos) : false;
|
||||||
if(not line->next or nextkl or nextor) {
|
if(not line->next or nextkl or nextor) {
|
||||||
|
|
||||||
gotorig = YES;
|
gotorig = YES;
|
||||||
originlineno = lineno;
|
originlineno = lineno;
|
||||||
@ -1857,13 +1857,18 @@ static bool check_multipart(const char* ptr, char* boundary) {
|
|||||||
|
|
||||||
inline bool put_on_new_line(const char *ptr, const char *prev_ptr) {
|
inline bool put_on_new_line(const char *ptr, const char *prev_ptr) {
|
||||||
|
|
||||||
if(((ptr[0] == ptr[1]) and (ptr[0] == ptr[2])) or
|
if((*ptr == CR) or
|
||||||
strneql(ptr, " * Origin: ", 11) or
|
(*ptr == CTRL_A) or
|
||||||
strneql(ptr, "SEEN-BY:", 8) or
|
is_quote(ptr) or
|
||||||
strneql(ptr, "Reply-To:", 9) or
|
((ptr[0] == ptr[1]) and (ptr[0] == ptr[2])) or
|
||||||
strneql(ptr, "To:", 3) or
|
(strneql(ptr, "-- ", 3) and (ptr[3] == CR)) or
|
||||||
strneql(ptr, "From:", 5) or
|
strneql(ptr, " * Origin: ", 11) /*or
|
||||||
(ptr[0] == prev_ptr[0]) and (ptr[1] == prev_ptr[1]))
|
(ptr[0] == prev_ptr[0]) and (ptr[1] == prev_ptr[1])*/)
|
||||||
|
return true;
|
||||||
|
// Put RFC kludges and SEEN-BY on new line
|
||||||
|
while(*ptr and (isxalnum(*ptr) or (*ptr == '-')))
|
||||||
|
ptr++;
|
||||||
|
if(*ptr == ':')
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1880,7 +1885,6 @@ void MakeLineIndex(GMsg* msg, int margin, bool getvalue, bool header_recode) {
|
|||||||
char ch, chln = 0, dochar;
|
char ch, chln = 0, dochar;
|
||||||
Line* line;
|
Line* line;
|
||||||
Line* nextline=NULL;
|
Line* nextline=NULL;
|
||||||
Line* prevline=NULL;
|
|
||||||
char* bp;
|
char* bp;
|
||||||
char* btmp=NULL;
|
char* btmp=NULL;
|
||||||
char* tptr;
|
char* tptr;
|
||||||
@ -2030,6 +2034,7 @@ void MakeLineIndex(GMsg* msg, int margin, bool getvalue, bool header_recode) {
|
|||||||
|
|
||||||
para = 0;
|
para = 0;
|
||||||
if(*ptr == CTRL_A or inheader) { // Found kludge/hidden line
|
if(*ptr == CTRL_A or inheader) { // Found kludge/hidden line
|
||||||
|
para = GLINE_KLUD;
|
||||||
line->type |= GLINE_HARD;
|
line->type |= GLINE_HARD;
|
||||||
if(getvalue and not CFG->ignorecharset) {
|
if(getvalue and not CFG->ignorecharset) {
|
||||||
tptr = ptr;
|
tptr = ptr;
|
||||||
@ -2204,11 +2209,7 @@ void MakeLineIndex(GMsg* msg, int margin, bool getvalue, bool header_recode) {
|
|||||||
if(wraps and not ((line->type & GLINE_HARD) and not (line->type & GLINE_QUOT))) {
|
if(wraps and not ((line->type & GLINE_HARD) and not (line->type & GLINE_QUOT))) {
|
||||||
if(para != GLINE_QUOT) {
|
if(para != GLINE_QUOT) {
|
||||||
if(quoteflag) {
|
if(quoteflag) {
|
||||||
if(prevline and (*prevline->txt.c_str() == CTRL_A) and (prevline->type & GLINE_WRAP)) {
|
if(para == GLINE_KLUD) {
|
||||||
wraps = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if((*ptr == CR) or is_quote(ptr) or (*ptr == CTRL_A)) {
|
|
||||||
wraps = 0;
|
wraps = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2502,7 +2503,7 @@ void MakeLineIndex(GMsg* msg, int margin, bool getvalue, bool header_recode) {
|
|||||||
else
|
else
|
||||||
line->color = C_READW;
|
line->color = C_READW;
|
||||||
|
|
||||||
prevline = line;
|
Line* prevline = line;
|
||||||
line = new Line();
|
line = new Line();
|
||||||
throw_xnew(line);
|
throw_xnew(line);
|
||||||
line->prev = prevline;
|
line->prev = prevline;
|
||||||
|
@ -882,7 +882,7 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
|
|||||||
strcpy(msg->to, omsg->By());
|
strcpy(msg->to, omsg->By());
|
||||||
strcpy(msg->realto, omsg->realby);
|
strcpy(msg->realto, omsg->realby);
|
||||||
msg->dest = omsg->orig;
|
msg->dest = omsg->orig;
|
||||||
strcpy(msg->idest, *omsg->ireplyto ? omsg->ireplyto : omsg->iorig);
|
strcpy(msg->idest, *omsg->ireplyto ? omsg->ireplyto : *omsg->iorig ? omsg->iorig : omsg->iaddr);
|
||||||
}
|
}
|
||||||
if(not *msg->iaddr)
|
if(not *msg->iaddr)
|
||||||
strcpy(msg->iaddr, msg->idest);
|
strcpy(msg->iaddr, msg->idest);
|
||||||
|
@ -579,8 +579,16 @@ int ExternUtil(GMsg *msg, ExtUtil *extutil) {
|
|||||||
int hardlines = EDIT->HardLines();
|
int hardlines = EDIT->HardLines();
|
||||||
EDIT->HardLines(false);
|
EDIT->HardLines(false);
|
||||||
LoadText(msg, editorfile);
|
LoadText(msg, editorfile);
|
||||||
|
|
||||||
EDIT->HardLines(hardlines);
|
EDIT->HardLines(hardlines);
|
||||||
|
|
||||||
|
// Prepend "@CHRS: XLATLOCALSET 2\n" to force proper encoding
|
||||||
|
if(not AA->Viewkludge()) {
|
||||||
|
char *msg_txt_chrs = (char *)throw_malloc(strlen(msg->txt)+strlen(CFG->xlatlocalset)+sizeof("\001CHRS: 2\r")+16);
|
||||||
|
sprintf(msg_txt_chrs, "\001CHRS: %s 2\r%s", CFG->xlatlocalset, msg->txt);
|
||||||
|
throw_free(msg->txt);
|
||||||
|
msg->txt = msg_txt_chrs;
|
||||||
|
}
|
||||||
|
|
||||||
// Ignore any kludge address found
|
// Ignore any kludge address found
|
||||||
msg->TextToLines(CFG->dispmargin-(int)CFG->switches.get(disppagebar), false);
|
msg->TextToLines(CFG->dispmargin-(int)CFG->switches.get(disppagebar), false);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user