Date: Thu, 31 Jan 2002 13:43:53 -0700 From: "Todd C. Miller" <Todd.Miller@courtesan.com> To: "Perry E. Metzger" <perry@wasabisystems.com> Cc: "M. Warner Losh" <imp@village.org>, wes@softweyr.com, tlambert2@mindspring.com, asmodai@wxs.nl, mckusick@mckusick.com, arch@FreeBSD.ORG, peter@wemm.org, phk@critter.freebsd.dk, deatley@apple.com, jkh@winston.freebsd.org, deraadt@cvs.openbsd.org Subject: Re: __P macro question Message-ID: <200201312043.g0VKhrDx004889@xerxes.courtesan.com> In-Reply-To: Your message of "31 Jan 2002 11:43:41 EST." <87d6zq31z6.fsf@snark.piermont.com> References: <20020131072933.GQ22384@daemon.ninth-circle.org> <3C58F78E.3F66EA8E@mindspring.com> <3C58FBEC.746257BB@softweyr.com> <20020131.085938.18394797.imp@village.org> <87d6zq31z6.fsf@snark.piermont.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <87d6zq31z6.fsf@snark.piermont.com> so spake "Perry E. Metzger" (perry): > If you do it by hand, we'll get source diffs by accident. If we build > a quick set of scripts to do it, since we'll all be using the same > scripts, we'll end up with fewer diffs. My inclination is to do the simple stuff programatically and do the more complicated things by hand. A simple, dumb, ed script such as the following is capable of changing the majority of things. It doesn't attempt to deal with multi-line prototypes nor does it try to convert prototypes that contain parens. These remaining things can then be converted by hand. Yes, you could hack up a perl script to try and do everything but would you really trust it? I wouldn't. My script can be called thusly: find bin -type f | xargs convert.ed #!/bin/sh for f in $@; do /bin/ed - $f <<'EOF' %s/[ ]*__P[ ]*((\([^()]*\)))/(\1)/g w q EOF done To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201312043.g0VKhrDx004889>