Fixes for tearlines
This commit is contained in:
parent
d838e6ca7d
commit
968a1d0980
@ -637,7 +637,7 @@ int Save_Msg(int IsReply, faddr *Dest)
|
|||||||
MsgText_Add2(Message[i]);
|
MsgText_Add2(Message[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Add_Footkludges(TRUE, NULL);
|
Add_Footkludges(TRUE, NULL, FALSE);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Save if to disk
|
* Save if to disk
|
||||||
|
@ -243,8 +243,9 @@ void Add_Headkludges(faddr *dest, int IsReply)
|
|||||||
/*
|
/*
|
||||||
* Add bottom message kludges. The flag Quote is false if this is called
|
* Add bottom message kludges. The flag Quote is false if this is called
|
||||||
* from Offline Reader, the user then may or may have not added a quote.
|
* from Offline Reader, the user then may or may have not added a quote.
|
||||||
|
* The QWK upload may set HasTear if the client already uploaded a tearline.
|
||||||
*/
|
*/
|
||||||
void Add_Footkludges(int Quote, char *tear)
|
void Add_Footkludges(int Quote, char *tear, int HasTear)
|
||||||
{
|
{
|
||||||
char *temp;
|
char *temp;
|
||||||
char *aka;
|
char *aka;
|
||||||
@ -280,11 +281,13 @@ void Add_Footkludges(int Quote, char *tear)
|
|||||||
/*
|
/*
|
||||||
* The offline reader may override the tearline
|
* The offline reader may override the tearline
|
||||||
*/
|
*/
|
||||||
if (tear == NULL) {
|
if (!HasTear) {
|
||||||
MsgText_Add2(TearLine());
|
if (tear == NULL) {
|
||||||
} else {
|
MsgText_Add2(TearLine());
|
||||||
sprintf(temp, "--- %s", tear);
|
} else {
|
||||||
MsgText_Add2(temp);
|
sprintf(temp, "--- %s", tear);
|
||||||
|
MsgText_Add2(temp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((msgs.Type == ECHOMAIL) || (msgs.Type == LIST)) {
|
if ((msgs.Type == ECHOMAIL) || (msgs.Type == LIST)) {
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
#ifndef _MSGUTIL_H
|
#ifndef _MSGUTIL_H
|
||||||
#define _MSGUTIL_H
|
#define _MSGUTIL_H
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
char *rfcdate(time_t); /* Create RFC style date */
|
char *rfcdate(time_t); /* Create RFC style date */
|
||||||
int Open_Msgbase(char *, int); /* Open msgbase for read/write */
|
int Open_Msgbase(char *, int); /* Open msgbase for read/write */
|
||||||
void Close_Msgbase(void); /* Close msgbase */
|
void Close_Msgbase(void); /* Close msgbase */
|
||||||
void Add_Headkludges(faddr *, int); /* Header part of kludges */
|
void Add_Headkludges(faddr *, int); /* Header part of kludges */
|
||||||
void Add_Footkludges(int, char *); /* Footer part of kludges */
|
void Add_Footkludges(int, char *, int); /* Footer part of kludges */
|
||||||
void Sema_Mailout(void); /* Set mailout semafore */
|
void Sema_Mailout(void); /* Set mailout semafore */
|
||||||
|
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ void Add_Kludges(fidoaddr dest, int IsReply, char *fn)
|
|||||||
fclose(tp);
|
fclose(tp);
|
||||||
}
|
}
|
||||||
|
|
||||||
Add_Footkludges(FALSE, newtear);
|
Add_Footkludges(FALSE, newtear, FALSE);
|
||||||
Msg_AddMsg();
|
Msg_AddMsg();
|
||||||
Msg_UnLock();
|
Msg_UnLock();
|
||||||
}
|
}
|
||||||
@ -2412,6 +2412,7 @@ void QWK_Fetch()
|
|||||||
unsigned long Area;
|
unsigned long Area;
|
||||||
struct tm *ltm = NULL;
|
struct tm *ltm = NULL;
|
||||||
fidoaddr dest;
|
fidoaddr dest;
|
||||||
|
int HasTear;
|
||||||
|
|
||||||
colour(9, 0);
|
colour(9, 0);
|
||||||
/* Processing BlueWave reply packet */
|
/* Processing BlueWave reply packet */
|
||||||
@ -2500,6 +2501,7 @@ void QWK_Fetch()
|
|||||||
* Normal message
|
* Normal message
|
||||||
*/
|
*/
|
||||||
Syslog('m', "Message");
|
Syslog('m', "Message");
|
||||||
|
HasTear = FALSE;
|
||||||
sprintf(otemp, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
|
sprintf(otemp, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
|
||||||
if ((mf = fopen(otemp, "r+")) != NULL) {
|
if ((mf = fopen(otemp, "r+")) != NULL) {
|
||||||
fread(&msgshdr, sizeof(msgshdr), 1, mf);
|
fread(&msgshdr, sizeof(msgshdr), 1, mf);
|
||||||
@ -2561,6 +2563,8 @@ void QWK_Fetch()
|
|||||||
*pLine = '\0';
|
*pLine = '\0';
|
||||||
Syslog('m', "1 Len=%d \"%s\"", strlen(szLine), printable(szLine, 0));
|
Syslog('m', "1 Len=%d \"%s\"", strlen(szLine), printable(szLine, 0));
|
||||||
MsgText_Add2(szLine);
|
MsgText_Add2(szLine);
|
||||||
|
if (strncmp(szLine, (char *)"--- ", 4) == 0)
|
||||||
|
HasTear = TRUE;
|
||||||
pLine = szLine;
|
pLine = szLine;
|
||||||
nCol = 0;
|
nCol = 0;
|
||||||
} else if (*pBuff != '\n') {
|
} else if (*pBuff != '\n') {
|
||||||
@ -2580,6 +2584,8 @@ void QWK_Fetch()
|
|||||||
*pLine = '\0';
|
*pLine = '\0';
|
||||||
Syslog('m', "2 Len=%d \"%s\"", strlen(szLine), printable(szLine, 0));
|
Syslog('m', "2 Len=%d \"%s\"", strlen(szLine), printable(szLine, 0));
|
||||||
MsgText_Add2(szLine);
|
MsgText_Add2(szLine);
|
||||||
|
if (strncmp(szLine, (char *)"--- ", 4) == 0)
|
||||||
|
HasTear = TRUE;
|
||||||
strcpy(szLine, szWrp);
|
strcpy(szLine, szWrp);
|
||||||
pLine = strchr(szLine, '\0');
|
pLine = strchr(szLine, '\0');
|
||||||
nCol = (short)strlen (szLine);
|
nCol = (short)strlen (szLine);
|
||||||
@ -2591,9 +2597,11 @@ void QWK_Fetch()
|
|||||||
*pLine = '\0';
|
*pLine = '\0';
|
||||||
Syslog('m', "3 Len=%d \"%s\"", strlen(szLine), printable(szLine, 0));
|
Syslog('m', "3 Len=%d \"%s\"", strlen(szLine), printable(szLine, 0));
|
||||||
MsgText_Add2(szLine);
|
MsgText_Add2(szLine);
|
||||||
|
if (strncmp(szLine, (char *)"--- ", 4) == 0)
|
||||||
|
HasTear = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
Add_Footkludges(FALSE, NULL);
|
Add_Footkludges(FALSE, NULL, HasTear);
|
||||||
Msg_AddMsg();
|
Msg_AddMsg();
|
||||||
Msg_UnLock();
|
Msg_UnLock();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user