Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / nvi / common / options.awk
blob0b81bb526f1ec84cde60617516c6ccfb82287316
1 # Id: options.awk,v 10.1 1995/06/08 19:00:01 bostic Exp (Berkeley) Date: 1995/06/08 19:00:01
3 /^\/\* O_[0-9A-Z_]*/ {
4 opt = $2
5 printf("#define %s %d\n", opt, cnt++)
6 ofs = FS
7 FS="\""
8 do getline
9 while ($1 != " {L(")
10 FS=ofs
11 opt_name = $2
12 if (opt_name < prev_name) {
13 printf "missorted %s: \"%s\" < \"%s\"\n", opt, opt_name, prev_name >"/dev/stderr"
14 exit 1
16 prev_name = opt_name
17 next
19 END {
20 printf("#define O_OPTIONCOUNT %d\n", cnt);