$Log$
+Revision 1.466 2000/02/22 16:37:28 ajc
+* Minor tweaks to RFC822 output to keep brain-damanged MS Outlook from dying
+
Revision 1.465 2000/02/22 04:17:56 ajc
* Got bounce messages working (mostly ... testers, please beat this up!)
* Changed 'FIX' comments to 'FIXME' (less conflict, plus vim highlights it!)
Fri Jul 10 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* Initial CVS import
-
void memfmout(
int width, /* screen width to use */
char *mptr, /* where are we going to get our text from? */
- char subst) /* nonzero if we should do substitutions */
+ char subst, /* nonzero if we should do substitutions */
+ char *nl) /* string to terminate lines with */
{
int a, b, c;
int real = 0;
if (((ch == 13) || (ch == 10)) && (old != 13) && (old != 10))
ch = 32;
if (((old == 13) || (old == 10)) && (isspace(real))) {
- cprintf("\n");
+ cprintf("%s", nl);
c = 1;
}
if (ch > 126)
if (ch > 32) {
if (((strlen(aaa) + c) > (width - 5)) && (strlen(aaa) > (width - 5))) {
- cprintf("\n%s", aaa);
+ cprintf("%s%s", nl, aaa);
c = strlen(aaa);
aaa[0] = 0;
}
}
if (ch == 32) {
if ((strlen(aaa) + c) > (width - 5)) {
- cprintf("\n");
+ cprintf("%s", nl);
c = 1;
}
cprintf("%s ", aaa);
goto FMTA;
}
if ((ch == 13) || (ch == 10)) {
- cprintf("%s\n", aaa);
+ cprintf("%s%s", aaa, nl);
c = 1;
strcpy(aaa, "");
goto FMTA;
}
goto FMTA;
-FMTEND: cprintf("%s\n", aaa);
+FMTEND: cprintf("%s%s", aaa, nl);
}
* message to the reader's screen width.
*/
if (TheMessage->cm_format_type == FMT_CITADEL) {
- memfmout(80, mptr, 0);
+ memfmout(80, mptr, 0, nl);
}
/* If the message on disk is format 4 (MIME), we've gotta hand it
void cmd_msgs (char *cmdbuf);
void help_subst (char *strbuf, char *source, char *dest);
void do_help_subst (char *buffer);
-void memfmout (int width, char *mptr, char subst);
+void memfmout (int width, char *mptr, char subst, char *nl);
void output_mime_parts(char *);
void cmd_msg0 (char *cmdbuf);
void cmd_msg2 (char *cmdbuf);
cprintf("Message ");
cprintf("from %s:\n", ptr->sender);
if (ptr->text != NULL)
- memfmout(80, ptr->text, 0);
+ memfmout(80, ptr->text, 0, "\n");
holdptr = ptr->next;
if (ptr->text != NULL) phree(ptr->text);
ptr->sender, /* sender of msg */
config.c_nodename); /* static for now */
if (ptr->text != NULL) {
- memfmout(80, ptr->text, 0);
+ memfmout(80, ptr->text, 0, "\n");
if (ptr->text[strlen(ptr->text)-1] != '\n') cprintf("\n");
phree(ptr->text);
}