1# Id: options.awk,v 10.1 1995/06/08 19:00:01 bostic Exp (Berkeley) Date: 1995/06/08 19:00:01 2 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 15 } 16 prev_name = opt_name 17 next 18} 19END { 20 printf("#define O_OPTIONCOUNT %d\n", cnt); 21} 22