summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/lib/libc/net/gen_ether_subr
blob: 9f9b63c7d049c443786723b70e95b3850e33e13a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

awk '
BEGIN {
	print
	print "#include <ctype.h>"
	print "#include <sys/types.h>"
	print "#include <errno.h>"
	print
	print "#define ETHER_ADDR_LEN 6"
	print
	print "int ether_aton_r(u_char *dest, size_t len, const char *str);"
	print
}
/^ether_aton_r/ {
	print prevline
	out = 1
}
{
	if (out) print
	else prevline = $0
}
/^}$/ {
	if (out) exit(0)
}' $1 >$2
OpenPOWER on IntegriCloud