hex2c.awk revision 1.2
11.2Sis# $NetBSD: hex2c.awk,v 1.2 1999/12/30 21:09:56 is Exp $
21.2Sis#
31.2Sis# Copyright (c) 1999 The NetBSD Foundation, Inc.
41.2Sis# All rights reserved.
51.2Sis#
61.2Sis# This code is derived from software contributed to The NetBSD Foundation
71.2Sis# by Ignatios Souvatzis.
81.2Sis#
91.2Sis# Redistribution and use in source and binary forms, with or without
101.2Sis# modification, are permitted provided that the following conditions
111.2Sis# are met:
121.2Sis# 1. Redistributions of source code must retain the above copyright
131.2Sis#    notice, this list of conditions and the following disclaimer.
141.2Sis# 2. Redistributions in binary form must reproduce the above copyright
151.2Sis#    notice, this list of conditions and the following disclaimer in the
161.2Sis#    documentation and/or other materials provided with the distribution.
171.2Sis# 3. All advertising materials mentioning features or use of this software
181.2Sis#    must display the following acknowledgement:
191.2Sis#        This product includes software developed by the NetBSD
201.2Sis#        Foundation, Inc. and its contributors.
211.2Sis# 4. Neither the name of The NetBSD Foundation nor the names of its
221.2Sis#    contributors may be used to endorse or promote products derived
231.2Sis#    from this software without specific prior written permission.
241.2Sis#
251.2Sis# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
261.2Sis# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
271.2Sis# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
281.2Sis# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
291.2Sis# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
301.2Sis# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
311.2Sis# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
321.2Sis# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
331.2Sis# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
341.2Sis# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
351.2Sis# POSSIBILITY OF SUCH DAMAGE.
361.2Sis#
371.1SisBEGIN{print "/* Generated by a script  --- do not edit */"}
381.1SisBEGIN{print "#include <sys/types.h>"}
391.1SisBEGIN{print "const u_int16_t kickstart[] = {"}
401.1SisBEGIN{size = 0}
411.1Sis{ printf("\t"); for(i=2;i<=NF;i++) {printf("0x%s, ",$i);size += 2};printf("\n");}
421.1SisEND{printf("\t0};\n");}
431.1SisEND{print "const size_t kicksize = ", size ";"}
44