diff options
Diffstat (limited to '')
-rwxr-xr-x | mantools/var2user | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mantools/var2user b/mantools/var2user new file mode 100755 index 0000000..78bb57c --- /dev/null +++ b/mantools/var2user @@ -0,0 +1,13 @@ +#!/bin/sh + +# var2user - create (variable name -> parameter name) mapping + +# Usage: var2user mail_params.h + +awk ' + +/^#define[ ]+VAR_/ { name=$3 } + +/^extern.*var_/ { print "table[\"" $3 "\"] = " name } + +' "$@" | tr -d ';*' |