Commit fff5db77 authored by rswindell's avatar rswindell
Browse files

Strip Ctrl-A codes from body text before printing.

Treat \n the same as \r (next msg cmd)when reading msgs.
parent 2c45c41f
......@@ -64,16 +64,8 @@ const char *mon[]={"Jan","Feb","Mar","Apr","May","Jun"
#include <string.h> /* strrchr */
#include <ctype.h> /* toupper */
#include "genwrap.h" /* stricmp */
#include "dirwrap.h" /* fexist */
#include "conwrap.h" /* getch */
#include "filewrap.h"
#include "smblib.h"
#include "gen_defs.h" /* MAX_PATH */
#ifdef __WATCOMC__
#include <dos.h>
#endif
#include "sbbs.h"
#include "conwrap.h"
/* gets is dangerous */
#define gets(str) fgets((str), sizeof(str), stdin)
......@@ -1414,7 +1406,7 @@ void readmsgs(ulong start)
printf("\n\n");
if((inbuf=smb_getmsgtxt(&smb,&msg, msgtxtmode))!=NULL) {
printf("%s",inbuf);
printf("%s",remove_ctrl_a(inbuf, inbuf));
free(inbuf);
}
......@@ -1475,6 +1467,7 @@ void readmsgs(ulong start)
setmsgattr(&smb, msg.hdr.number, msg.hdr.attr^MSG_DELETE);
break;
case CR:
case '\n':
case '+':
printf("Next\n");
msg.offset++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment