diff options
Diffstat (limited to 'lib/skip_comments.c')
| -rw-r--r-- | lib/skip_comments.c | 11 |
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; +} |
