1*57718be8SEnji Cooper#!/bin/sh 2*57718be8SEnji Cooper 3*57718be8SEnji Cooperawk ' 4*57718be8SEnji CooperBEGIN { 5*57718be8SEnji Cooper print 6*57718be8SEnji Cooper print "#include <ctype.h>" 7*57718be8SEnji Cooper print "#include <sys/types.h>" 8*57718be8SEnji Cooper print "#include <errno.h>" 9*57718be8SEnji Cooper print 10*57718be8SEnji Cooper print "#define ETHER_ADDR_LEN 6" 11*57718be8SEnji Cooper print 12*57718be8SEnji Cooper print "int ether_aton_r(u_char *dest, size_t len, const char *str);" 13*57718be8SEnji Cooper print 14*57718be8SEnji Cooper} 15*57718be8SEnji Cooper/^ether_aton_r/ { 16*57718be8SEnji Cooper print prevline 17*57718be8SEnji Cooper out = 1 18*57718be8SEnji Cooper} 19*57718be8SEnji Cooper{ 20*57718be8SEnji Cooper if (out) print 21*57718be8SEnji Cooper else prevline = $0 22*57718be8SEnji Cooper} 23*57718be8SEnji Cooper/^}$/ { 24*57718be8SEnji Cooper if (out) exit(0) 25*57718be8SEnji Cooper}' $1 >$2 26