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