aboutsummaryrefslogtreecommitdiff
path: root/lib/skip_comments.c
diff options
context:
space:
mode:
authorKlaatu <[email protected]>2015-05-17 15:33:21 +1200
committerKlaatu <[email protected]>2015-05-17 15:33:21 +1200
commitb0de699679e8f1e39af847ed172d1ba605b4370c (patch)
tree01dac00471d61f727394e508c613b29cff0ceae5 /lib/skip_comments.c
bulk upload of source
Diffstat (limited to 'lib/skip_comments.c')
-rw-r--r--lib/skip_comments.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/skip_comments.c b/lib/skip_comments.c
new file mode 100644
index 0000000..fd0bdde
--- /dev/null
+++ b/lib/skip_comments.c
@@ -0,0 +1,11 @@
+void skip_comments(char **s) /*EXTRACT_INCL*/ {
+ char **d, *p;
+ for (d=s; (p=*s); s++) {
+ if (p[0] == '#') {
+ if (p[1] == '#') ++p;
+ else continue;
+ }
+ *d++ = p;
+ }
+ *d=0;
+}