Small fixes

This commit is contained in:
Alexander S. Aganichev 2001-05-25 03:43:20 +00:00
parent 383290c2ee
commit d8ca130bd0
3 changed files with 21 additions and 19 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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)