From fff5db7786d68dd64484d0958e4c801ca1eaac63 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Sat, 4 Apr 2020 02:37:26 +0000 Subject: [PATCH] Strip Ctrl-A codes from body text before printing. Treat \n the same as \r (next msg cmd)when reading msgs. --- src/sbbs3/smbutil.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/sbbs3/smbutil.c b/src/sbbs3/smbutil.c index 210e73b6b6..ce96a805bd 100644 --- a/src/sbbs3/smbutil.c +++ b/src/sbbs3/smbutil.c @@ -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++; -- GitLab