dheader and hheader were the same function, really, so rename one of
them to header, kill the other and use both with a different arg...
This commit is contained in:
parent
65e278a877
commit
3c20c603ca
@ -37,45 +37,25 @@ function usage()
|
|||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function dheader(dfile)
|
function header(file)
|
||||||
{
|
{
|
||||||
if (os == "NetBSD")
|
if (os == "NetBSD")
|
||||||
printf("/*\t\$NetBSD\$\t*/\n\n") > dfile
|
printf("/*\t\$NetBSD\$\t*/\n\n") > file
|
||||||
else if (os == "FreeBSD")
|
else if (os == "FreeBSD")
|
||||||
printf("/* \$FreeBSD\$ */\n\n") > dfile
|
printf("/* \$FreeBSD\$ */\n\n") > file
|
||||||
else if (os == "OpenBSD")
|
else if (os == "OpenBSD")
|
||||||
printf("/*\t\$OpenBSD\$\t*/\n\n") > dfile
|
printf("/*\t\$OpenBSD\$\t*/\n\n") > file
|
||||||
else
|
else
|
||||||
printf("/* ??? */\n\n") > dfile
|
printf("/* ??? */\n\n") > file
|
||||||
printf("/*\n") > dfile
|
printf("/*\n") > file
|
||||||
printf(" * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \
|
printf(" * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \
|
||||||
> dfile
|
> file
|
||||||
printf(" *\n") > dfile
|
printf(" *\n") > file
|
||||||
printf(" * generated from:\n") > dfile
|
printf(" * generated from:\n") > file
|
||||||
printf(" *\t%s\n", VERSION) > dfile
|
printf(" *\t%s\n", VERSION) > file
|
||||||
printf(" */\n") > dfile
|
printf(" */\n") > file
|
||||||
}
|
}
|
||||||
|
|
||||||
function hheader(hfile)
|
|
||||||
{
|
|
||||||
if (os == "NetBSD")
|
|
||||||
printf("/*\t\$NetBSD\$\t*/\n\n") > hfile
|
|
||||||
else if (os == "FreeBSD")
|
|
||||||
printf("/* \$FreeBSD\$ */\n\n") > hfile
|
|
||||||
else if (os == "OpenBSD")
|
|
||||||
printf("/*\t\$OpenBSD\$\t*/\n\n") > hfile
|
|
||||||
else
|
|
||||||
printf("/* ??? */\n\n") > hfile
|
|
||||||
printf("/*\n") > hfile
|
|
||||||
printf(" * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \
|
|
||||||
> hfile
|
|
||||||
printf(" *\n") > hfile
|
|
||||||
printf(" * generated from:\n") > hfile
|
|
||||||
printf(" *\t%s\n", VERSION) > hfile
|
|
||||||
printf(" */\n") > hfile
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function vendor(hfile)
|
function vendor(hfile)
|
||||||
{
|
{
|
||||||
nvendors++
|
nvendors++
|
||||||
@ -261,12 +241,10 @@ while ((getline < srcfile) > 0) {
|
|||||||
if (line == 1) {
|
if (line == 1) {
|
||||||
VERSION = $0
|
VERSION = $0
|
||||||
gsub("\\$", "", VERSION)
|
gsub("\\$", "", VERSION)
|
||||||
|
|
||||||
if (dfile)
|
if (dfile)
|
||||||
dheader(dfile)
|
header(dfile)
|
||||||
|
|
||||||
if (hfile)
|
if (hfile)
|
||||||
hheader(hfile)
|
header(hfile)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ($1 == "vendor") {
|
if ($1 == "vendor") {
|
||||||
|
Loading…
Reference in New Issue
Block a user