1*11a6dbe7Smartin# $NetBSD: hex2c.awk,v 1.3 2008/04/30 13:10:59 martin Exp $
2b41bac45Sis#
3b41bac45Sis# Copyright (c) 1999 The NetBSD Foundation, Inc.
4b41bac45Sis# All rights reserved.
5b41bac45Sis#
6b41bac45Sis# This code is derived from software contributed to The NetBSD Foundation
7b41bac45Sis# by Ignatios Souvatzis.
8b41bac45Sis#
9b41bac45Sis# Redistribution and use in source and binary forms, with or without
10b41bac45Sis# modification, are permitted provided that the following conditions
11b41bac45Sis# are met:
12b41bac45Sis# 1. Redistributions of source code must retain the above copyright
13b41bac45Sis#    notice, this list of conditions and the following disclaimer.
14b41bac45Sis# 2. Redistributions in binary form must reproduce the above copyright
15b41bac45Sis#    notice, this list of conditions and the following disclaimer in the
16b41bac45Sis#    documentation and/or other materials provided with the distribution.
17b41bac45Sis#
18b41bac45Sis# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19b41bac45Sis# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20b41bac45Sis# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21b41bac45Sis# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22b41bac45Sis# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23b41bac45Sis# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24b41bac45Sis# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25b41bac45Sis# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26b41bac45Sis# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27b41bac45Sis# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28b41bac45Sis# POSSIBILITY OF SUCH DAMAGE.
29b41bac45Sis#
304905974fSisBEGIN{print "/* Generated by a script  --- do not edit */"}
314905974fSisBEGIN{print "#include <sys/types.h>"}
324905974fSisBEGIN{print "const u_int16_t kickstart[] = {"}
334905974fSisBEGIN{size = 0}
344905974fSis{ printf("\t"); for(i=2;i<=NF;i++) {printf("0x%s, ",$i);size += 2};printf("\n");}
354905974fSisEND{printf("\t0};\n");}
364905974fSisEND{print "const size_t kicksize = ", size ";"}
37