File: rfcnum.awk

package info (click to toggle)
tirc 1.2-10
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,388 kB
  • ctags: 1,909
  • sloc: ansic: 19,264; sh: 2,671; makefile: 222; awk: 14
file content (17 lines) | stat: -rw-r--r-- 411 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#	$Id: rfcnum.awk,v 1.2 1997/10/04 16:23:37 mkb Exp $

BEGIN {
	print "/* Generated by rfcnum.awk, do not edit. */"
	print "/* $Id: rfcnum.awk,v 1.2 1997/10/04 16:23:37 mkb Exp $ */\n"
	print "#ifndef NUM_H"
	print "#define NUM_H\t1\n"
}
/^ +[0-9][0-9][0-9] +(ERR|RPL)/ {
	printf("#define %s\t%s\n", $2, $1)
	if (length($3) > 0)
		printf("#define %s\t%s\n", $4, $3)
}
END {
	print "\n#endif\t/* !NUM_H */\n"
}