[comp.sources.d] PD formatter for C code?

krebs@utah-cs.UUCP (Randall S. Krebs) (01/14/88)

Does anyone out there in netland know if there is a public domain version
of a C source code formatter (ala indent)?

Thanks in advance for any help you can offer.

randall s. krebs

willcox@ccvaxa.UUCP (01/26/88)

indent is in the public domain.


David A. Willcox
Gould CSD-Urbana
1101 E. University Ave.
Urbana, IL 61801
217-384-8500
UUCP: ihnp4!uiucdcs!ccvaxa!willcox
ARPA: willcox@gswd-vms

willcox@ccvaxa.UUCP (02/02/88)

Several people have asked me on what basis I claim that indent is in
the public domain.  I knew I would be sorry I made that posting.

Some history.  Way back in 1976, the project I worked on at the
University of Illinois Center for Advanced Computation had a huge
battle about how to format C code.  After about a week of fighting, I
got disgusted and wrote a program, which I called indent, to reformat C
code.  It had a bunch of different options that would let you format
the output the way you liked.  In particular, all of the different
formats being championed were supported.

It was my first big C program.  It was ugly.  It wasn't designed, it
just sort of grew.  But it pretty much worked, and it stopped most of
the fighting.

As a matter of form, I included a University of Illinois Copyright
notice.  However, my understanding was that, since the work was done
on an ARPA contract, it was in the public domain.

Time passed.  Some years later, indent showed up on one of the early
emacs distributions.

Later still, someone from UC Berlekey called the UofI and asked if
indent was in the public domain.  They wanted to include it in their
UNIX distributions, along with the emacs stuff.  I was no longer at the
UofI, but Rob Kolstad, who was, asked me about it.  I told him I didn't
care if they used it, and since then it has been on the BSD distributions.

Somewhere along the way, several other unnamed people have had their
hands in it.  It was converted to understand version 7 C.  (The
original was version 6.)  It was converted from its original filter
interface to its current "blow away the user's file" interface.
The $HOME/.indent.pro file parsing was added.  Some more formatting
options were added.

The source I have right now has two copyright notices.  One is the
original from the UofI.  One is from Berkeley.

I am not a lawyer, and I certainly do not understand copyright law.  As
far as I am concerned, the bulk of this program, everything covered by
the UofI copyright, is in the public domain, and worth every penny.
Berkeley's copyright probably should only cover their changes, and I
don't know their feelings about sending it out.  

Since I am not sure, I am not willing to just send it out.  However, I
will try to get some definitive word on it.

(Note - I do have one of those old 1-inch DECTAPEs with the original
indent source.  That I am sure I could distribute, but a) I don't have
the equipment to read it any more, and b) you probably wouldn't want
that version, anyway.)

----------
The opinions expressed herein are DEFINITELY my own, and not those of
my employer, especially the bits about copyrights.

David A. Willcox
Gould CSD-Urbana
1101 E. University Ave.
Urbana, IL 61801
217-384-8500
UUCP: ihnp4!uiucdcs!ccvaxa!willcox
ARPA: willcox@gswd-vms.arpa

oz@yunexus.UUCP (Ozan Yigit) (02/05/88)

In article <26500002@ccvaxa> willcox@ccvaxa.UUCP writes:
>
>Time passed.  Some years later, indent showed up on one of the early
>emacs distributions.
>...
>David A. Willcox

That was the Gosling Emacs distribution, and contains the Illinois
compyright David mentioned. I have that version of indent,
and I would be quite willing to post that version as soon as its author
clarifies its status. So, David, just say when.

oz
-- 
Those who lose the sight	     Usenet: [decvax|ihnp4]!utzoo!yunexus!oz
of what is really important 	    	     ......!seismo!mnetor!yunexus!oz
are destined to become 		     Bitnet: oz@[yusol|yulibra|yuyetti]
irrelevant.	    - anon	     Phonet: +1 416 736-5257 x 3976