diff options
author | Mats O Jansson <maja@cvs.openbsd.org> | 2000-03-25 18:17:20 +0000 |
---|---|---|
committer | Mats O Jansson <maja@cvs.openbsd.org> | 2000-03-25 18:17:20 +0000 |
commit | eebca53173b43fcb801ad06804b1b183038298d2 (patch) | |
tree | 6ff7bc38513004836052fce9056c48bb680167a3 /gnu/usr.bin/lynx/cfg_defs.sh | |
parent | 0270bc013175ccc71004e1c5f79171acbbc9ae3d (diff) |
Upgrade to Lynx 2.8.2. -moj
Diffstat (limited to 'gnu/usr.bin/lynx/cfg_defs.sh')
-rw-r--r-- | gnu/usr.bin/lynx/cfg_defs.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/gnu/usr.bin/lynx/cfg_defs.sh b/gnu/usr.bin/lynx/cfg_defs.sh new file mode 100644 index 00000000000..4f8a00347bb --- /dev/null +++ b/gnu/usr.bin/lynx/cfg_defs.sh @@ -0,0 +1,44 @@ +#!/bin/sh +# Translate the lynx_cfg.h and config.cache data into a table, useful for +# display at runtime. + +OUT=cfg_defs.h + +cat >$OUT <<EOF +#ifndef CFG_DEFS_H +#define CFG_DEFS_H 1 + +static CONST struct { + CONST char *name; + CONST char *value; +} config_cache[] = { +EOF + +sed \ + -e '/^#/d' \ + -e 's/^.[^=]*_cv_//' \ + -e 's/=\${.*=/=/' \ + -e 's/}$//' \ + config.cache | cfg_edit.sh >>$OUT + +cat >>$OUT <<EOF +}; + +static CONST struct { + CONST char *name; + CONST char *value; +} config_defines[] = { +EOF +fgrep '#define' lynx_cfg.h | +sed -e 's@ @ @g' \ + -e 's@ @ @g' \ + -e 's@^[ ]*#define[ ]*@@' \ + -e 's@[ ]*/\*.*\*/@@' \ + -e 's@[ ][ ]*@=@' \ + | cfg_edit.sh >>$OUT + +cat >>$OUT <<EOF +}; + +#endif /* CFG_DEFS_H */ +EOF |