From 901ecd6850e956f5d963fd8a5474fb7c193dc84c Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Mon, 2 Jan 2006 05:05:12 +0000 Subject: Make this generate code with ansi function declarations. No binary change in compiled version of generated file. --- sys/kern/vnode_if.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'sys/kern/vnode_if.sh') diff --git a/sys/kern/vnode_if.sh b/sys/kern/vnode_if.sh index 9e8d38501b5..026c47aa773 100644 --- a/sys/kern/vnode_if.sh +++ b/sys/kern/vnode_if.sh @@ -29,7 +29,7 @@ copyright="\ * SUCH DAMAGE. */ " -SCRIPT_ID='$OpenBSD: vnode_if.sh,v 1.14 2005/05/22 21:07:23 pedro Exp $' +SCRIPT_ID='$OpenBSD: vnode_if.sh,v 1.15 2006/01/02 05:05:11 jsg Exp $' # SCRIPT_ID='$NetBSD: vnode_if.sh,v 1.9 1996/02/29 20:58:22 cgd Exp $' # Script to produce VFS front-end sugar. @@ -315,14 +315,23 @@ function doit() { # Define inline function. printf("\nint %s(", toupper(name)); + desclen = 5 + length(name); for (i=0; i 77) { + printf("\n "); + arglen += 4; + desclen = 0; + } + printf("%s %s", argtype[i], argname[i]); + if (i < (argc-1)) { + printf(", "); + desclen += 2; + } + desclen += arglen; } printf(")\n"); - for (i=0; i