summaryrefslogtreecommitdiffstats
path: root/mantools/var2user
blob: 78bb57cdbf28309c86569e68d3ab84bec7f066c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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 ';*'