aboutsummaryrefslogtreecommitdiff
path: root/rf.c
diff options
context:
space:
mode:
Diffstat (limited to 'rf.c')
-rw-r--r--rf.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/rf.c b/rf.c
index b78524a..441f105 100644
--- a/rf.c
+++ b/rf.c
@@ -15,8 +15,8 @@
#define _POSIX_C_SOURCE 200809L
#define RUNFILE_VER_MAJ 1
-#define RUNFILE_VER_MIN 2
-#define RUNFILE_VER_FIX 5
+#define RUNFILE_VER_MIN 3
+#define RUNFILE_VER_FIX 0
/*
*> rfile version system
@@ -89,6 +89,12 @@ int main(int argc, char **argv)
else if (cmd[0] == '#') /* TODO: strchr() up to # and trim cmd to only skip
the commented-out part to allow in-line comments */
continue;
+ #if defined(RF_EXTRAS) || defined(RF_EXTRA_MORE_COMMENTS)
+ else if (strncmp(cmd, "// ", 3) == 0)
+ continue;
+ else if (strncmp(cmd, "-- ", 3) == 0)
+ continue;
+ #endif
else if (strcmp(cmd, "}") == 0 || strcmp(line, "}") == 0) {
in_section = false;
@@ -148,7 +154,9 @@ int main(int argc, char **argv)
char *expanded = expand_vars(cmd);
+ #if !defined(RF_HIDDEN_CMD)
printf("$ %s\n", expanded);
+ #endif
if (wordexp(expanded, &p, 0) != 0) {
fprintf(stderr, "wordexp failed\n");