Release 0.95.11, patches by Scott Street. Netmail nodelist sysop lookup added and some fixes

This commit is contained in:
Michiel Broek
2011-01-26 23:37:48 +01:00
parent 19a0ee7bd9
commit 6c577239f6
22 changed files with 201 additions and 48 deletions

View File

@@ -1,10 +1,9 @@
/*****************************************************************************
*
* $Id: dispfile.c,v 1.26 2007/09/02 15:04:36 mbse Exp $
* Purpose ...............: Display ANSI/ASCII textfiles
*
*****************************************************************************
* Copyright (C) 1997-2007
* Copyright (C) 1997-2011
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -314,7 +313,7 @@ int DisplayFile(char *filename)
break;
default: snprintf(tmp1, sizeof(tmp1)-1, "%c", buf[x]);
strncat(out, tmp1, sizeof(out));
strncat(out, tmp1, sizeof(out)-1);
} /* switch */
} /* for */

View File

@@ -1,10 +1,9 @@
/*****************************************************************************
*
* $Id: email.c,v 1.35 2008/02/12 19:59:45 mbse Exp $
* Purpose ...............: Internet email
*
*****************************************************************************
* Copyright (C) 1997-2008
* Copyright (C) 1997-2011
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -438,7 +437,7 @@ int Read_a_Email(unsigned int Num)
* a reply will be made.
*/
if (strncasecmp(p, "\001Message-id: ", 13) == 0) {
snprintf(Msg.Msgid, 101, "%s", p+13);
snprintf(Msg.Msgid, sizeof(Msg.Msgid), "%s", p+13);
Syslog('m', "Stored Msgid \"%s\"", Msg.Msgid);
}
if (Kludges) {
@@ -747,9 +746,9 @@ void Reply_Email(int IsReply)
Line = 1;
Msg_New();
snprintf(Msg.Replyid, 101, "%s", msgid);
snprintf(Msg.ReplyTo, 101, "%s", replyto);
snprintf(Msg.ReplyAddr, 101, "%s", replyaddr);
snprintf(Msg.Replyid, sizeof(Msg.Replyid), "%s", msgid);
snprintf(Msg.ReplyTo, sizeof(Msg.ReplyTo), "%s", replyto);
snprintf(Msg.ReplyAddr, sizeof(Msg.ReplyAddr), "%s", replyaddr);
/* From : */
pout(YELLOW, BLACK, (char *) Language(209));

View File

@@ -1,10 +1,9 @@
/*****************************************************************************
*
* $Id: fsedit.c,v 1.28 2007/08/25 18:32:08 mbse Exp $
* Purpose ...............: FullScreen Message editor.
*
*****************************************************************************
* Copyright (C) 1997-2007
* Copyright (C) 1997-2011
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -395,8 +394,11 @@ int FsWordWrap()
if ((WCol == 80) && (Col >= WCol))
WCol = strlen((char *)tmpLine)+1;
else {
if (tmpLine[strlen((char *)tmpLine)] != ' ')
snprintf((char *)tmpLine + strlen((char *)tmpLine), 1, " ");
if (tmpLine[strlen((char *)tmpLine)] != ' '){
int tmpLength=strlen((char *)tmpLine);
tmpLine[tmpLength] = ' ';
tmpLine[tmpLength+1] = '\0';
}
WCol = strlen((char *)tmpLine);
}
snprintf(Message[CurRow+1], TEXTBUFSIZE +1, "%s", strcat((char *)tmpLine, Message[CurRow+1]));

View File

@@ -1,11 +1,10 @@
/*****************************************************************************
*
* $Id: mail.c,v 1.69 2008/02/12 19:59:45 mbse Exp $
* Purpose ...............: Message reading and writing.
* Todo ..................: Implement message groups.
*
*****************************************************************************
* Copyright (C) 1997-2008
* Copyright (C) 1997-2011
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -503,8 +502,38 @@ void Post_Msg()
} else if (msgs.Type == NETMAIL) {
x = FALSE;
Enter(1);
pout(YELLOW, BLACK, (char *)"Address : ");
FidoNode = calloc(61, sizeof(char));
/*
* Search for Name in Sysop Index of Nodelist
*/
node_list *nodesSysop;
node_list *thisNode;
node_list *prevNode;
if ( NULL ==( nodesSysop=searchSysop(Msg.To) )){
snprintf(msg, 81, "%s\r\n\n", (char*)Language(480));
pout(RED, BLACK, msg);
} else {
snprintf(msg, 81, "%s\r\n\n", (char*)Language(481));
pout(GREEN, BLACK, msg);
thisNode = nodesSysop;
while ( thisNode != NULL ){
snprintf(msg, 81, "(%d:%d/%d:%d) %s @ %s\r\n",
thisNode->addr.zone, thisNode->addr.net,
thisNode->addr.node, thisNode->addr.point,
thisNode->Name, thisNode->Location);
pout(CYAN, BLACK, msg);
prevNode = thisNode;
thisNode = thisNode->next;
free( prevNode );
}
pout(YELLOW, BLACK, (char *)"\r\n");
}
/*
* End Search
*/
pout(YELLOW, BLACK, (char *)"Address : ");
colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
GetstrC(FidoNode, 60);
@@ -1610,9 +1639,9 @@ void Reply_Msg(int IsReply)
Message[i] = (char *) calloc(MAX_LINE_LENGTH +1, sizeof(char));
Msg_New();
strncpy(Msg.Replyid, msgid, 101);
strncpy(Msg.ReplyTo, replyto, 101);
strncpy(Msg.ReplyAddr, replyaddr, 101);
strncpy(Msg.Replyid, msgid, sizeof(Msg.Replyid));
strncpy(Msg.ReplyTo, replyto, sizeof(Msg.ReplyTo));
strncpy(Msg.ReplyAddr, replyaddr, sizeof(Msg.ReplyAddr));
/* From : */
if (Alias_Option()) {

View File

@@ -1,10 +1,9 @@
/*****************************************************************************
*
* $Id: msgutil.c,v 1.24 2005/10/11 20:49:48 mbse Exp $
* Purpose ...............: Utilities for message handling.
*
*****************************************************************************
* Copyright (C) 1997-2005
* Copyright (C) 1997-2011
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -160,7 +159,7 @@ void Add_Headkludges(faddr *dest, int IsReply)
time_t tt;
faddr *Node;
temp = calloc(128, sizeof(char));
temp = calloc(PATH_MAX, sizeof(char));
switch (msgs.Type) {
case LOCALMAIL: Msg.Localmail = TRUE;

View File

@@ -1,10 +1,9 @@
/*****************************************************************************
*
* $Id: oneline.c,v 1.15 2007/02/26 14:48:23 mbse Exp $
* Purpose ...............: Oneliner functions.
*
*****************************************************************************
* Copyright (C) 1997-2005
* Copyright (C) 1997-2011
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -196,7 +195,7 @@ char *Oneliner_Get()
/*
* Get a random oneliner
*/
sFileName = calloc(128, sizeof(char));
sFileName = calloc(PATH_MAX, sizeof(char));
snprintf(sFileName, PATH_MAX, "%s/etc/oneline.data", getenv("MBSE_ROOT"));
if ((pOneline = fopen(sFileName, "r+")) == NULL) {