xref: /freebsd/usr.bin/indent/README (revision 05248206f720394d95c2a7475429311df670a2e9)
1dc51023cSPhilippe Charnier
29b50d902SRodney W. GrimesThis is the C indenter, it originally came from the University of Illinois
39b50d902SRodney W. Grimesvia some distribution tape for PDP-11 Unix.  It has subsequently been
49b50d902SRodney W. Grimeshacked upon by James Gosling @ CMU.  It isn't very pretty, and really needs
59b50d902SRodney W. Grimesto be completely redone, but it is probably the nicest C pretty printer
69b50d902SRodney W. Grimesaround.
79b50d902SRodney W. Grimes
89b50d902SRodney W. GrimesFurther additions to provide "Kernel Normal Form" were contributed
99b50d902SRodney W. Grimesby the folks at Sun Microsystems.
109b50d902SRodney W. Grimes
119b50d902SRodney W. Grimes++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
129b50d902SRodney W. Grimes> From mnetor!yunexus!oz@uunet.UU.NET Wed Mar  9 15:30:55 1988
139b50d902SRodney W. Grimes> Date: Tue, 8 Mar 88 18:36:25 EST
149b50d902SRodney W. Grimes> From: yunexus!oz@uunet.UU.NET (Ozan Yigit)
159b50d902SRodney W. Grimes> To: bostic@okeeffe.berkeley.edu
169b50d902SRodney W. Grimes> Cc: ccvaxa!willcox@uunet.UU.NET, jag@sun.com, rsalz@uunet.UU.NET
179b50d902SRodney W. Grimes> In-Reply-To: Keith Bostic's message of Tue, 16 Feb 88 16:09:06 PST
189b50d902SRodney W. Grimes> Subject: Re: Indent...
199b50d902SRodney W. Grimes
209b50d902SRodney W. GrimesThank you for your response about indent. I was wrong in my original
219b50d902SRodney W. Grimesobservation (or mis-observation :-). UCB did keep the Illinois
229b50d902SRodney W. Grimescopyright intact.
239b50d902SRodney W. Grimes
249b50d902SRodney W. GrimesThe issue still is whether we can distribute indent, and if we can, which
259b50d902SRodney W. Grimesversion. David Willcox (the author) states that:
269b50d902SRodney W. Grimes
279b50d902SRodney W. Grimes| Several people have asked me on what basis I claim that indent is in
289b50d902SRodney W. Grimes| the public domain.  I knew I would be sorry I made that posting.
299b50d902SRodney W. Grimes|
309b50d902SRodney W. Grimes| Some history.  Way back in 1976, the project I worked on at the
319b50d902SRodney W. Grimes| University of Illinois Center for Advanced Computation had a huge
329b50d902SRodney W. Grimes| battle about how to format C code.  After about a week of fighting, I
339b50d902SRodney W. Grimes| got disgusted and wrote a program, which I called indent, to reformat C
349b50d902SRodney W. Grimes| code.  It had a bunch of different options that would let you format
359b50d902SRodney W. Grimes| the output the way you liked.  In particular, all of the different
369b50d902SRodney W. Grimes| formats being championed were supported.
379b50d902SRodney W. Grimes|
389b50d902SRodney W. Grimes| It was my first big C program.  It was ugly.  It wasn't designed, it
399b50d902SRodney W. Grimes| just sort of grew.  But it pretty much worked, and it stopped most of
409b50d902SRodney W. Grimes| the fighting.
419b50d902SRodney W. Grimes|
429b50d902SRodney W. Grimes| As a matter of form, I included a University of Illinois Copyright
439b50d902SRodney W. Grimes| notice.  However, my understanding was that, since the work was done
449b50d902SRodney W. Grimes| on an ARPA contract, it was in the public domain.
459b50d902SRodney W. Grimes|
469b50d902SRodney W. Grimes| Time passed.  Some years later, indent showed up on one of the early
479b50d902SRodney W. Grimes| emacs distributions.
489b50d902SRodney W. Grimes|
49dc51023cSPhilippe Charnier| Later still, someone from UC Berkeley called the UofI and asked if
509b50d902SRodney W. Grimes| indent was in the public domain.  They wanted to include it in their
519b50d902SRodney W. Grimes| UNIX distributions, along with the emacs stuff.  I was no longer at the
529b50d902SRodney W. Grimes| UofI, but Rob Kolstad, who was, asked me about it.  I told him I didn't
539b50d902SRodney W. Grimes| care if they used it, and since then it has been on the BSD distributions.
549b50d902SRodney W. Grimes|
559b50d902SRodney W. Grimes| Somewhere along the way, several other unnamed people have had their
569b50d902SRodney W. Grimes| hands in it.  It was converted to understand version 7 C.  (The
579b50d902SRodney W. Grimes| original was version 6.)  It was converted from its original filter
589b50d902SRodney W. Grimes| interface to its current "blow away the user's file" interface.
599b50d902SRodney W. Grimes| The $HOME/.indent.pro file parsing was added.  Some more formatting
609b50d902SRodney W. Grimes| options were added.
619b50d902SRodney W. Grimes|
629b50d902SRodney W. Grimes| The source I have right now has two copyright notices.  One is the
639b50d902SRodney W. Grimes| original from the UofI.  One is from Berkeley.
649b50d902SRodney W. Grimes|
659b50d902SRodney W. Grimes| I am not a lawyer, and I certainly do not understand copyright law.  As
669b50d902SRodney W. Grimes| far as I am concerned, the bulk of this program, everything covered by
679b50d902SRodney W. Grimes| the UofI copyright, is in the public domain, and worth every penny.
689b50d902SRodney W. Grimes| Berkeley's copyright probably should only cover their changes, and I
699b50d902SRodney W. Grimes| don't know their feelings about sending it out.
709b50d902SRodney W. Grimes
71dc51023cSPhilippe CharnierIn any case, there appears to be none at UofI to clarify/and change
729b50d902SRodney W. Grimesthat copyright, but I am confident (based on the statements of its
739b50d902SRodney W. Grimesauthor) that the code, as it stands with its copyright, is
749b50d902SRodney W. Grimesdistributable, and will not cause any legal problems.
759b50d902SRodney W. Grimes
769b50d902SRodney W. GrimesHence, the issue reduces to *which* one to distribute through
779b50d902SRodney W. Grimescomp.sources.unix. I would suggest that with the permission of you
789b50d902SRodney W. Grimesfolks (given that you have parts copyrighted), we distribute the 4.3
799b50d902SRodney W. Grimesversion of indent, which appears to be the most up-to-date version. I
809b50d902SRodney W. Grimeshappen to have just about every known version of indent, including the
819b50d902SRodney W. Grimesvery original submission from the author to a unix tape, later the
829b50d902SRodney W. GrimesG-Emacs version, any 4.n version, sun version and the Unipress
839b50d902SRodney W. Grimesversion.  I still think we should not have to "go-back-in-time" and
849b50d902SRodney W. Grimesre-do all the work you people have done.
859b50d902SRodney W. Grimes
869b50d902SRodney W. GrimesI hope to hear from you as to what you think about this. You may of
879b50d902SRodney W. Grimescourse send 4.3 version to the moderator directly, or you can let me
889b50d902SRodney W. Grimesknow of your permission, and I will send the sources, or you can let
899b50d902SRodney W. Grimesme know that 4.3 version is off-limits, in which case we would probably
909b50d902SRodney W. Grimeshave to revert to an older version. One way or another, I hope to get
919b50d902SRodney W. Grimesa version of indent to comp.sources.unix.
929b50d902SRodney W. Grimes
939b50d902SRodney W. Grimesregards..	oz
949b50d902SRodney W. Grimes
959b50d902SRodney W. Grimescc: ccvaxa!willcox
969b50d902SRodney W. Grimes    sun.com!jar
979b50d902SRodney W. Grimes    uunet!rsalz
989b50d902SRodney W. Grimes
99