From owner-freebsd-questions Wed Mar 20 19: 2:38 2002 Delivered-To: freebsd-questions@freebsd.org Received: from roc-66-66-72-6.rochester.rr.com (roc-66-66-72-6.rochester.rr.com [66.66.72.6]) by hub.freebsd.org (Postfix) with ESMTP id 1AB7837B404 for ; Wed, 20 Mar 2002 19:02:33 -0800 (PST) Received: by roc-66-66-72-6.rochester.rr.com (Postfix, from userid 1000) id B3D8E901A00; Wed, 20 Mar 2002 22:01:08 -0500 (EST) Date: Wed, 20 Mar 2002 22:01:08 -0500 From: mpd To: Peter Leftwich Cc: Gary Kline , FreeBSD Questions Subject: Re: K&R to ANSI? [nroff?] Message-ID: <20020320220108.A279@rochester.rr.com> References: <200203210239.g2L2dqm49467@tao.thought.org> <20020320214944.T47592-100000@earl-grey.cloud9.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020320214944.T47592-100000@earl-grey.cloud9.net>; from Hostmaster@Video2Video.Com on Wed, Mar 20, 2002 at 09:53:43PM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Mar 20, 2002 at 09:53:43PM -0500, Peter Leftwich wrote: > On Wed, 20 Mar 2002, Gary Kline wrote: > > Does anybody know if there are existant tools that can transform K&R functions to the standard? > > foo (n) > > int ; > > to > > foo (int n) > > I'm tweaking one of our more ancient ports and would like to update the params. > > thanks for any clues, > > gary > > -- > > Gary Kline kline@thought.org www.thought.org Public service Unix > > What are K&R functions and what do you mean by "the standard?" > > I know you are asking about C code and not command-line stuff, but would > any of these commands help you with your cause "nroff" "groff" "troff"? No. Those don't format this kind of text. He's looking for something that takes old style (pre-ANSI) C code and converts it to ANSI C. I have never encountered a kr2ansi converter that even came close to being complete. I could generally do it faster by hand. Maybe that's the reason there's so much k&r code in my /usr/src directory. > > These are odd little preprocessors that I'm playing around with, trying to > get it so the user can do something like "man iplog | roff | grep -i > default" -- the ESC codes that boldify some of the letters prevent simple > grepping! :( > > -- > Peter Leftwich mike -- ___________________________________________________________ "AND THEN THEY SAID 'NO ONE LEAVES THIS COMPOUND ALIVE!!'" - Little Girl from "THE MR NUTTY SCHOOL OF PLACEMAT DESIGN" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message