diff --git a/GNUmakef.def b/GNUmakef.def index 336bc42..d8612d8 100644 --- a/GNUmakef.def +++ b/GNUmakef.def @@ -3,7 +3,7 @@ ifeq ($(findstring EMX, $(PATH)), EMX) CC=gcc AR=ar -RANLIB=ranlib +RANLIB=ar s PLATFORM=emx SHELL=bash EXEEXT=.exe @@ -11,7 +11,7 @@ OBJEXT=.o LIBEXT=.a #CC=gcc -Zomf #AR=emxomfar -#RANLIB=ranlib +#RANLIB=emxomfar s #PLATFORM=emx #SHELL=bash #EXEEXT=.exe diff --git a/golded3/gectrl.cpp b/golded3/gectrl.cpp index fe28a6d..5d9c2bc 100644 --- a/golded3/gectrl.cpp +++ b/golded3/gectrl.cpp @@ -422,24 +422,26 @@ void DoKludges(int mode, GMsg* msg, bool attronly) { char to_buf[256]; *to_buf = NUL; - if(*msg->idest or strchr(msg->to, '@')) { - char* ptr = *msg->idest ? msg->idest : msg->to; - sprintf(to_buf, "%s%sTo: %s", rfc, AA->isnewsgroup() ? "X-" : "", ptr); - if(not strieql(ptr, msg->realto) and *msg->realto) { - mime_header_encode(buf, msg->realto, msg); - sprintf(buf2, " (%s)", buf); - strcat(to_buf, buf2); - } - } - - if(*to_buf and AA->isemail()) { + if(AA->isemail() and (*msg->ito or strchr(msg->to, '@'))) { + char* ptr = *msg->ito ? msg->ito : msg->to; + mime_header_encode(buf, ptr, msg); + sprintf(to_buf, "%s%sTo: %s", rfc, AA->isnewsgroup() ? "X-" : "", buf); line = AddKludge(line, to_buf); line->kludge = GKLUD_RFC; } - if(*msg->iorig) { + if(*msg->ifrom) { + mime_header_encode(buf2, msg->ifrom, msg); + sprintf(buf, "%sFrom: %s", rfc, buf2); + line = AddKludge(line, buf); + line->kludge = GKLUD_RFC; + } + else if(*msg->iorig) { mime_header_encode(buf2, msg->By(), msg); - sprintf(buf, "%sFrom: \"%s\" <%s>", rfc, buf2, msg->iorig); + if(*buf2) + sprintf(buf, "%sFrom: \"%s\" <%s>", rfc, buf2, msg->iorig); + else + sprintf(buf, "%sFrom: %s", rfc, msg->iorig); line = AddKludge(line, buf); line->kludge = GKLUD_RFC; } diff --git a/golded3/gehdre.cpp b/golded3/gehdre.cpp index b3bfd8a..63c5229 100644 --- a/golded3/gehdre.cpp +++ b/golded3/gehdre.cpp @@ -450,14 +450,14 @@ int EditHeaderinfo(int mode, GMsgHeaderView &view) { strcpy(msg->realto, msg->to); strcpy(msg->iorig, from_addr.c_str()); strcpy(msg->idest, to_addr.c_str()); - if(*msg->realby) + if(*msg->realby and *msg->iorig) sprintf(msg->ifrom, "\"%s\" <%s>", msg->realby, msg->iorig); else - sprintf(msg->ifrom, "%s", msg->iorig); + strcpy(msg->ifrom, msg->iorig); if(*msg->realto) - sprintf(msg->ito, "\"%s\" %s", msg->realto, msg->idest); + sprintf(msg->ito, "\"%s\" <%s>", msg->realto, msg->idest); else - sprintf(msg->ito, "%s", msg->idest); + strcpy(msg->ito, msg->idest); if(msg->orig.net == 0) msg->orig = msg->oorig = AA->Aka().addr; if(msg->dest.net == 0)