xref: /freebsd/contrib/netbsd-tests/lib/libc/net/gen_ether_subr (revision 6ba2210ee039f2f12878c217bcf058e9c8b26b29)
1#!/bin/sh
2
3awk '
4BEGIN {
5	print
6	print "#include <ctype.h>"
7	print "#include <sys/types.h>"
8	print "#include <errno.h>"
9	print
10	print "#define ETHER_ADDR_LEN 6"
11	print
12	print "int ether_aton_r(u_char *dest, size_t len, const char *str);"
13	print
14}
15/^ether_aton_r/ {
16	print prevline
17	out = 1
18}
19{
20	if (out) print
21	else prevline = $0
22}
23/^}$/ {
24	if (out) exit(0)
25}' $1 >$2
26