From d7229970f8910aa756d299f8bdceee7f4d1fbfbc Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Wed, 8 Feb 2023 13:19:56 +0100 Subject: add env and make smash be able to parse files with comments --- smash/comment.c | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 smash/comment.c (limited to 'smash/comment.c') diff --git a/smash/comment.c b/smash/comment.c new file mode 100644 index 0000000..8171cf1 --- /dev/null +++ b/smash/comment.c @@ -0,0 +1,6 @@ +#include "comment.h" + +void remove_comment(char *line) { + while (*line && *line != '#') ++line; + *line = 0; +} -- cgit v1.2.3-70-g09d2