Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site utcs.UUCP Path: utzoo!utcs!geoff From: geoff@utcs.UUCP (Geoff Collyer) Newsgroups: net.lang.c Subject: Re: Re: C Indentation Survey Results (long...) Message-ID: <620@utcs.UUCP> Date: Sat, 27-Apr-85 19:42:07 EST Article-I.D.: utcs.620 Posted: Sat Apr 27 19:42:07 1985 Date-Received: Sat, 27-Apr-85 20:19:47 EST References: <9930@brl-tgr.ARPA> <381@busch.UUCP> <5497@utzoo.UUCP> <350@gumby.UUCP> <5521@utzoo.UUCP> <202@ucbcad.UUCP> Reply-To: geoff@utcs.UUCP (Geoff Collyer) Organization: University of Toronto - General Purpose UNIX Lines: 23 Keywords: System V cb para pretty-printing Summary: Sys V cb is much better than the v7 cb For those of us who like ``the One True Brace Style'' (i.e. the style used in the v7 kernel and K&R), the System V cb is a big improvement over the v7 cb. The v7 one was pretty wimpy, but the System V one when invoked as `cb -s -j' does a pretty good job of making even fairly wretched code legible. It's not as good as Mike Tilson's para pretty-printer for v6 C, alas. Para could be fed a C program containing no unnecessary whitespace and produce a fairly beautifully formatted equivalent. Para had the guts to assume that the original formatting was utterly wrong and completely reformatted the program. As an aside, one of the first programs one would want to sic `cb -s -j' on is cb.c. Why is it that the sources of so many pretty-printers (notably v7 cb, Sys V cb and I believe indent) are themselves in need of pretty-printing? I'd have more confidence in a pretty-printer if its source were attractive, just as one is suspicious of a chef who won't eat his own cooking. Incidentally, the first things I usually do with incoming code are to beautify it, delint it and *then* visually inspect and debug it. I wish that these precautions were not routinely necessary; in particular I feel that I shouldn't have to delint code that originated on UNIX(tm). -- Eighth Edition: consider it UNIX.