diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2015-12-16 12:07:16 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2015-12-16 12:20:45 +0200 |
commit | 9e978b089268e6bfc4b8fcdf9ef721f6fa92c11f (patch) | |
tree | c94e728d95ecabc03f7eef76ecae6dd71bdaebf0 | |
parent | e71c1a855797de245105494a05623753e32844a4 (diff) | |
download | grecs-9e978b089268e6bfc4b8fcdf9ef721f6fa92c11f.tar.gz grecs-9e978b089268e6bfc4b8fcdf9ef721f6fa92c11f.tar.bz2 |
Add option to hide configuration statements from help output
* src/format.c (grecs_print_statement_array): Skip elements
marked with GRECS_HIDDEN flag.
* src/grecs.hin (GRECS_HIDDEN): New flag.
-rw-r--r-- | src/format.c | 2 | ||||
-rw-r--r-- | src/grecs.hin | 1 | ||||
-rw-r--r-- | src/preproc.c | 3 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/format.c b/src/format.c index cff4019..aaad65a 100644 --- a/src/format.c +++ b/src/format.c @@ -190,2 +190,4 @@ grecs_print_statement_array(struct grecs_keyword *kwp, for (; kwp->ident; kwp++, n++) { + if (kwp->flags & GRECS_HIDDEN) + continue; if (n) diff --git a/src/grecs.hin b/src/grecs.hin index 677a237..e4e271b 100644 --- a/src/grecs.hin +++ b/src/grecs.hin @@ -104,2 +104,3 @@ enum grecs_data_type { #define GRECS_LIST 0x08 +#define GRECS_HIDDEN 0x10 diff --git a/src/preproc.c b/src/preproc.c index 56dcc22..9945097 100644 --- a/src/preproc.c +++ b/src/preproc.c @@ -608,4 +608,3 @@ parse_include(const char *text, int once) p++; - } - else + } else allow_cwd = 1; |