Skip to content
Snippets Groups Projects
Commit f25ee42e authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Strip control characters/sequences from custom node status strings

This utility doesn't expand Ctrl-A codes, so just strip them.
parent 3066a485
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4502 failed
...@@ -199,9 +199,9 @@ $(UNBAJA): $(UNBAJA_OBJS) | $(OBJODIR) $(EXEODIR) ...@@ -199,9 +199,9 @@ $(UNBAJA): $(UNBAJA_OBJS) | $(OBJODIR) $(EXEODIR)
$(QUIET)$(CC) $(CONSOLE_LDFLAGS) -o $@ $(UNBAJA_OBJS) $(XPDEV_LIBS) $(UTIL_LIBS) $(QUIET)$(CC) $(CONSOLE_LDFLAGS) -o $@ $(UNBAJA_OBJS) $(XPDEV_LIBS) $(UTIL_LIBS)
# Node Utility # Node Utility
$(NODE): $(NODE_OBJS) $(NODE): $(NODE_OBJS $(ENCODE_LIB)
@echo Linking $@ @echo Linking $@
$(QUIET)$(CC) $(CONSOLE_LDFLAGS) -o $@ $(NODE_OBJS) $(XPDEV_LIBS) $(QUIET)$(CC) $(CONSOLE_LDFLAGS) -o $@ $(NODE_OBJS) $(XPDEV_LIBS) $(ENCODE_LIBS)
# FIXSMB Utility # FIXSMB Utility
$(FIXSMB): $(FIXSMB_OBJS) $(FIXSMB): $(FIXSMB_OBJS)
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "genwrap.h" /* stricmp */ #include "genwrap.h" /* stricmp */
#include "filewrap.h" /* lock/unlock/sopen */ #include "filewrap.h" /* lock/unlock/sopen */
#include "getctrl.h" #include "getctrl.h"
#include "str_util.h" // strip_ctrl()
enum { enum {
MODE_LIST MODE_LIST
...@@ -240,6 +241,7 @@ static char* extended_status(int num, char* str) ...@@ -240,6 +241,7 @@ static char* extended_status(int num, char* str)
*str = '\0'; *str = '\0';
else else
str[127] = 0; str[127] = 0;
strip_ctrl(str, str);
return str; return str;
} }
......
...@@ -152,6 +152,7 @@ UNBAJA_OBJS = \ ...@@ -152,6 +152,7 @@ UNBAJA_OBJS = \
$(OBJODIR)/unbaja$(OFILE) $(OBJODIR)/unbaja$(OFILE)
NODE_OBJS = $(OBJODIR)/node$(OFILE) \ NODE_OBJS = $(OBJODIR)/node$(OFILE) \
$(OBJODIR)/str_util$(OFILE) \
$(OBJODIR)/getctrl$(OFILE) $(OBJODIR)/getctrl$(OFILE)
FIXSMB_OBJS = \ FIXSMB_OBJS = \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment