From: VZDMZA::IN%"HUBER%DM0MPI53.BITNET@vm.gmd.de" "Joseph Huber, MPI Muenchen" 19-FEB-1992 15:36:55.51 To: IN%"WIEHL@VKCMZD.Chemie.Uni-Mainz.de" CC: Subj: INDENT PART 5 of 5 Received: from vm.gmd.de by VzdmzA.ZDV.Uni-Mainz.DE (PMDF #12046) id <01GGPI2R78J48WW2TF@VzdmzA.ZDV.Uni-Mainz.DE>; Wed, 19 Feb 1992 15:28 GMT +0100 Received: from DM0MPI11 by vm.gmd.de (IBM VM SMTP R1.2.2MX) with BSMTP id 3102; Wed, 19 Feb 92 15:29:24 CET Received: from DM0MPI53.BITNET (DM0MPI53@DM0MPI12) by DM0MPI11 (Mailer R2.08) with BSMTP id 9558; Wed, 19 Feb 92 15:30:14 GMT Date: Wed, 19 Feb 92 15:21 +0200 From: "Joseph Huber, MPI Muenchen" Subject: INDENT PART 5 of 5 To: WIEHL@VKCMZD.Chemie.Uni-Mainz.de Message-id: <01GGPI2R78J48WW2TF@VzdmzA.ZDV.Uni-Mainz.DE> Organization: Max-Planck-Institut fuer Physik, Muenchen X-Envelope-to: WIEHL@VKCMZD.Chemie.Uni-Mainz.de X-Delivery-Notice: SMTP MAIL FROM does not correspond to sender. X-Original-To: RSCS%"WIEHL@VKCMZD.CHEMIE.UNI-MAINZ.DE" Comments: This is gatewayed mail. WARNING: Mail may not necessarily be returnable thru this path. -+-+-+-+-+-+-+-+ START OF PART 5 -+-+-+-+-+-+-+-+ X.Cx \&`5B X.Fl fc1 X.Cx \&\ `7C\ \& X.Fl nfc1 X.Cx \&`5D X.Cx X.Oo X.Op Fl i Ar n X.Oo X.Cx \&`5B X.Fl ip X.Cx \&\ `7C\ \& X.Fl nip X.Cx \&`5D X.Cx X.Oo X.Op Fl l Ar n X.Op Fl lc Ar n X.Oo X.Cx \&`5B X.Fl lp X.Cx \&\ `7C\ \& X.Fl nlp X.Cx \&`5D X.Cx X.Op Fl npro X.Cx \&`5B X.Fl pcs X.Cx \&\ `7C\ \& X.Fl npcs X.Cx \&`5D X.Cx X.Cx \&`5B X.Fl psl X.Cx \&\ `7C\ \& X.Fl npsl X.Cx \&`5D X.Cx X.Cx \&`5B X.Fl sc X.Cx \&\ `7C\ \& X.Fl nsc X.Cx \&`5D X.Cx X.Cx \&`5B X.Fl sob X.Cx \&\ `7C\ \& X.Fl nsob X.Cx \&`5D X.Cx X.Op Fl st X.Op Fl troff X.Cx \&`5B X.Fl v X.Cx \&\ `7C\ \& X.Fl nv X.Cx \&`5D X.Cx X.Sh DESCRIPTION X.Nm Indent Xis a X.Ar C Xprogram formatter. It reformats the X.Ar C Xprogram in the X.Ar input-file Xaccording to the switches. The switches which can be Xspecified are described below. They may appear before or after the file Xnames. X.Pp X.Sy NOTE : XIf you only specify an X.Ar input-file , Xthe formatting is Xdone `60in-place', that is, the formatted file is written back into X.Ar input-file Xand a backup copy of X.Ar input-file Xis written in the current directory. If X.Ar input-file Xis named X.Sq Pa /blah/blah/file , Xthe backup file is named X.Pa file.BAK . X.Pp XIf X.Ar output-file Xis specified, X.Nm indent Xchecks to make sure it is different from X.Ar input-file . X.Pp XThe options listed below control the formatting style imposed by X.Nm indent . X.Tw Op X.Tp Fl bad , nbad XIf X.Fl bad Xis specified, a blank line is forced after every block of Xdeclarations. Default: X.Fl nbad . X.Tp Fl bap , nbap XIf X.Fl bap Xis specified, a blank line is forced after every procedure body. Default: X.Fl nbap . X.Tp Fl bbb , nbbb XIf X.Fl bbb Xis specified, a blank line is forced before every block comment. Default: X.Fl nbbb . X.Tp Fl bc , nbc XIf X.Fl bc Xis specified, then a newline is forced after each comma in a declaration. X.Fl nbc Xturns off this option. The default is X.Fl bc . X.Tp Fl br , bl XSpecifying X.Fl bl Xlines up compound statements like this: X.ne 4 X.Ds I Xif (...) X`7B X code X`7D X.De XSpecifying X.Fl br X(the default) makes them look like this: X.ne 3 X.Ds I Xif (...) `7B X code X`7D X.De X.Pp X.Tp Fl c n XThe column in which comments on code start. The default is 33. X.Tp Fl cd n XThe column in which comments on declarations start. The default Xis for these comments to start in the same column as those on code. X.Tp Fl cdb , ncdb XEnables (disables) the placement of comment delimiters on blank lines. With Xthis option enabled, comments look like this: X.Ds I X.ne 3 X`09/* X`09* this is a comment X`09*/ X.De XRather than like this: X.Ds I X`09/* this is a comment */ X.De XThis only affects block comments, not comments to the right of Xcode. The default is X.Fl cdb . X.Tp Fl ce , nce XEnables (disables) forcing `60else's to cuddle up to the immediately precedi Vng X`60`7D'. The default is X.Fl ce . X.Tp Cx Fl ci X.Ar n X.Cx XSets the continuation indent to be X.Ar n . XContinuation Xlines will be indented that far from the beginning of the first line of the Xstatement. Parenthesized expressions have extra indentation added to Xindicate the nesting, unless X.Fl lp Xis in effect. X.Fl ci Xdefaults to the same value as X.Fl i . X.Tp Cx Fl cli X.Ar n X.Cx XCauses case labels to be indented X.Ar n Xtab stops to the right of the containing X.Ic switch Xstatement. X.Fl cli0 .5 Xcauses case labels to be indented half a tab stop. The Xdefault is X.Fl cli0 . X.Tp Cx Fl d X.Ar n X.Cx XControls the placement of comments which are not to the Xright of code. The default X.Fl d1 Xmeans that such comments are placed one indentation level to the Xleft of code. Specifying X.Fl d0 Xlines up these comments with the code. See the section on comment Xindentation below. X.Tp Cx Fl di X.Ar n X.Cx XSpecifies the indentation, in character positions, from a declaration keywor Vd Xto the following identifier. The default is X.Fl di16 . X.Tp Fl dj , ndj X.Fl dj Xleft justifies declarations. X.Fl ndj Xindents declarations the same as code. The default is X.Fl ndj . X.Tp Fl ei , nei XEnables (disables) special X.Ic else-if Xprocessing. If it's enabled, an X.Ic if Xfollowing an X.Ic else Xwill have the same indentation as the preceding X.Ic if Xstatement. X.Tp Fl fc1 , nfc1 XEnables (disables) the formatting of comments that start in column 1. XOften, comments whose leading `60/' is in column 1 have been carefully Xhand formatted by the programmer. In such cases, X.Fl nfc1 Xshould be Xused. The default is X.Fl fc1 . X.Tp Cx Fl i X.Ar n X.Cx XThe number of spaces for one indentation level. The default is 4. X.Tp Fl ip , nip XEnables (disables) the indentation of parameter declarations from the left Xmargin. The default is X.Fl ip . X.Tp Cx Fl l X.Ar n X.Cx XMaximum length of an output line. The default is 75. X.Tp Fl lp , nlp XLines up code surrounded by parenthesis in continuation lines. If a line Xhas a left paren which is not closed on that line, then continuation lines Xwill be lined up to start at the character position just after the left Xparen. For example, here is how a piece of continued code looks with X.Fl nlp Xin effect: X.ne 2 X.Ds I X.Li p1 = first_procedure(second_procedure(p2, p3), X.Li \ \ third_procedure(p4,p5)); X.De X.ne 5 XWith X.Fl lp Xin effect (the default) the code looks somewhat clearer: X.Ds I X.Li p1\ =\ first_procedure(second_procedure(p2,\ p3), X.Li \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ third_procedure(p4,p5)); X.De X.ne 5 XInserting two more newlines we get: X.Ds I X.Li p1\ =\ first_procedure(second_procedure(p2, X.Li \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ V \ \ p3), X.Li \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ third_procedure(p4 X.Li \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ V \ p5)); X.De X.Pp X.Tp Fl npro XCauses the profile files, X.Sq Pa ./.indent.pro Xand X.Sq Pa `7E/.indent.pro , Xto be ignored. X.Tp Fl pcs , npcs XIf true X.Pq Fl pcs Xall procedure calls will have a space inserted between Xthe name and the `60('. The default is X.Fl npcs . X.Tp Fl psl , npsl XIf true X.Pq Fl psl Xthe names of procedures being defined are placed in Xcolumn 1 \- their types, if any, will be left on the previous lines. The Xdefault is X.Fl psl . X.Tp Fl sc , nsc XEnables (disables) the placement of asterisks (`60*'s) at the left edge of a Vll Xcomments. X.Tp Fl sob , nsob XIf X.Fl sob Xis specified, indent will swallow optional blank lines. You can use this to Xget rid of blank lines after declarations. Default: X.Fl nsob . X.Tp Fl st XCauses X.Nm indent Xto take its input from stdin, and put its output to stdout. X.Tp Cx Fl T X.Ar typename X.Cx XAdds X.Ar typename Xto the list of type keywords. Names accumulate: X.Fl T Xcan be specified more than once. You need to specify all the typenames that Xappear in your program that are defined by X.Ic typedef X\- nothing will be Xharmed if you miss a few, but the program won't be formatted as nicely as Xit should. This sounds like a painful thing to have to do, but it's really Xa symptom of a problem in C: X.Ic typedef Xcauses a syntactic change in the Xlanguage and X.Nm indent Xcan't find all Xinstances of X.Ic typedef . X.Tp Fl troff XCauses X.Nm indent Xto format the program for processing by troff. It will produce a fancy Xlisting in much the same spirit as X.Xr vgrind 1 . XIf the output file is not specified, the default is standard output, Xrather than formatting in place. X.Tp Fl v , nv X.Fl v Xturns on `60verbose' mode; X.Fl nv Xturns it off. When in verbose mode, X.Nm indent Xreports when it splits one line of input into two or more lines of output, Xand gives some size statistics at completion. The default is X.Fl nv . X.Tp X.Pp XYou may set up your own `60profile' of defaults to X.Nm indent Xby creating a file called X.Pa .indent.pro Xin your login directory and/or the current directory and including Xwhatever switches you like. A `60.indent.pro' in the current directory take Vs Xprecedence over the one in your login directory. If X.Nm indent Xis run and a profile file exists, then it is read to set up the program's Xdefaults. Switches on the command line, though, always override profile Xswitches. The switches should be separated by spaces, tabs or newlines. X.Pp X.Ss Comments X.Sq Em Box X.Em comments . X.Nm Indent Xassumes that any comment with a dash or star immediately after the start of Xcomment (that is, `60/*\-' or `60/**') is a comment surrounded by a box of s Vtars. XEach line of such a comment is left unchanged, except that its indentation Xmay be adjusted to account for the change in indentation of the first line Xof the comment. X.Pp X.Em Straight text . XAll other comments are treated as straight text. X.Nm Indent Xfits as many words (separated by blanks, tabs, or newlines) on a Xline as possible. Blank lines break paragraphs. X.Pp X.Ss Comment indentation XIf a comment is on a line with code it is started in the `60comment column', Xwhich is set by the X.Cx Fl c X.Ar n X.Cx Xcommand line parameter. Otherwise, the comment is started at X.Ar n Xindentation levels less than where code is currently being placed, where X.Ar n Xis specified by the X.Cx Fl d X.Ar n X.Cx Xcommand line parameter. If the code on a line extends past the comment Xcolumn, the comment starts further to the right, and the right margin may be Xautomatically extended in extreme cases. X.Pp X.Ss Preprocessor lines XIn general, X.Nm indent Xleaves preprocessor lines alone. The only Xreformatting that it will do is to straighten up trailing comments. It Xleaves embedded comments alone. Conditional compilation X.Pq Ic #ifdef...#endif Xis recognized and X.Nm indent Xattempts to correctly Xcompensate for the syntactic peculiarities introduced. X.Pp X.Ss C syntax X.Nm Indent Xunderstands a substantial amount about the syntax of C, but it Xhas a `60forgiving' parser. It attempts to cope with the usual sorts of Xincomplete and misformed syntax. In particular, the use of macros like: X.Dl #define forever for(;;) Xis handled properly. X.Sh ENVIRONMENT X.Nm Indent Xuses the X.Ev HOME Xenvironment variable. X.Sh FILES X.Dw \&./.indent.pro X.Di L X.Dp Pa \&./.indent.pro Xprofile file X.Dp Pa `7E/.indent.pro Xprofile file X.Dp X.Sh HISTORY X.Nm Indent Xappeared in 4.2 BSD. X.Sh BUGS X.Nm Indent Xhas even more switches than X.Xr ls 1 . X.Pp X.ne 5 XA common mistake that often causes grief is typing: X.Dl indent *.c Xto the shell in an attempt to indent all the X.Nm C Xprograms in a directory. XThis is probably a bug, not a feature. $ CALL UNPACK INDENT.1;2 941653119 $ create 'f' X1 INDENT X NAME X INDENT - indent and format C program source X X`09 To define the INDENT command, include the line X`09`09$ INDENT :== $IML$ROOT:`5BINDENT`5DINDENT X`09 in your LOGIN.COM X X FORMAT X INDENT `5B input-file `5B output-file `5D `5D `5B options `5D X X DESCRIPTION X Indent is a C program formatter. It reformats the C program in X the input-file according to the switches. The switches which can X be specified are described below. They may appear before or after X the file names. X X If output-file is specified, indent checks to make sure it is X different from input-file. X X OPTIONS X X The options listed below control the formatting style imposed by X indent. X X -bap,-nbap If -bap is specified, a blank line is forced after X every procedure body. Default: -nbap. X X -bad,-nbad If -bad is specified, a blank line is forced after X every block of declarations. Default: -nbad. X X -bbb,-nbbb If -bbb is specified, a blank line is forced X before every block comment. Default: -nbbb. X X -bc,-nbc If -bc is specified, then a newline is forced X after each comma in a declaration. -nbc turns off X this option. The default is -bc. X X -br,-bl,-brr Specifying -bl (the default) lines up compound X statements like this: X if (...) X `7B X code X `7D X X Specifying -br makes them look like this: X if (...) `7B X code X `7D X And specifying -brr makes them look like this: X if (...) X `7B X code X `7D X X -bsl,-nbsl Specifies to break a single line that starts with X `60if (...)' after the `60)'. The default is -nbsl V. X`09`20 X -cn The column in which comments on code start. The X default is 33. X X -cdn The column in which comments on declarations X start. The default is for these comments to start X in the same column as those on code. X X -cdb,-ncdb Enables (disables) the placement of comment delim- X iters on blank lines. With this option enabled, X comments look like this: X /* X * this is a comment X */ X Rather than like this: X /* this is a comment */ X This only affects block comments, not comments to X the right of code. The default is -ncdb . X X -ce,-nce Enables (disables) forcing `60else's to cuddle up t Vo X the immediately preceeding `60`7D'. The default is V -nce. X X -cin Sets the continuation indent to be n. Continua- X tion lines will be indented that far from the X beginning of the first line of the statement. X Parenthesized expressions have extra indentation X added to indicate the nesting, unless -lp is in X effect. -ci defaults to the same value as -i. X X -clin Causes case labels to be indented n tab stops to X the right of the containing switch statement. - X cli0.5 causes case labels to be indented half a X tab stop. The default is -cli0 . X X -ccin Causes case code to be indented n tab stops to the X right of the corresponding case label. -cci0.5 X causes case code to be indented half a tab stop. X The default is -cci1 . X X -dn Controls the placement of comments which are not X to the right of code. The default -d1 means that X such comments are placed one indentation level to X the left of code. Specifying -d0 lines up these X comments with the code. See the section on com- X ment indentation below. X X -din Specifies the indentation, in character positions, X from a declaration keyword to the following iden- X tifier. The default is -di0. X X -dj,-ndj Left justifies declarations. Indents declarations X the same as code. The default is ndj. X X -ei,-nei Enables (disables) special `60else-if' processing.` V20 X If it's enabled, an `60if' following an `60else' wi Vll X have the same indentation as the preceding `60if' X statement. The default is ei. X X -fc1,-nfc1 Enables (disables) the formatting of comments that X start in column 1. Often, comments whose leading X `60/' is in column 1 have been carefully hand for- X matted by the programmer. In such cases, -nfc1 X should be used. The default is -fc1. X X -in The number of spaces for one indentation level. X The default is 2. X X -ip,-nip Enables (disables) the indentation of parameter X declarations from the left margin. The default is X -ip . X X -ln Maximum length of an output line. The default is X 132. X X -lp,-nlp Lines up code surrounded by parenthesis in con- X tinuation lines. If a line has a left paren which X is not closed on that line, then continuation X lines will be lined up to start at the character X position just after the left paren. For example, X here is how a piece of continued code looks with X -nlp in effect: X p1 = first_procedure(second_procedure(p2, p3), X third_procedure(p4, p5)); X With -lp in effect (the default) the code looks X somewhat clearer: X p1 = first_procedure(second_procedure(p2, p3), X third_procedure(p4, p5)); X Inserting a couple more newlines we get: X p1 = first_procedure(second_procedure(p2, X p3), X third_procedure(p4, X p5)); X X -npro Causes the profile file `60indent.pro' to be ignore Vd. X X -pcs , -npcs If true (-pcs) all procedure calls will have a X space inserted between the name and the '('. The X default is -npcs X X -prs , -nprs If true (-prs) all parentheses will have a space X inserted after the '(' and before the ')'. The X default is -nprs X X -psl , -npsl If true (-psl) the names of procedures being X defined are placed in column 1 - their types, if X any, will be left on the previous lines. The X default is -npsl X X -sc,-nsc Enables (disables) the placement of asterisks X (`60*'s) at the left edge of all comments. The X default is -nsc X X -sob,-nsob If -sob is specified, indent will swallow optional X blank lines. You can use this to get rid of blank X lines after declarations. Default: -nsob X X -spc,-nspc If -spc is specified, spaces are placed after`20 X commas in statement lines. Default: -nspc X X -st Causes indent to take its input from stdin, and X put its output to stdout. X X -Ttypename Adds typename to the list of type keywords. Names X accumulate: -T can be specified more than once. X You need to specify all the typenames that appear X in your program that are defined by typedefs - X nothing will be harmed if you miss a few, but the X program won't be formatted as nicely as it should. X This sounds like a painful thing to have to do, X but it's really a symptom of a problem in C: X typedef causes a syntactic change in the language X and indent can't find all typedefs. X X -troff Causes indent to format the program for processing X by troff. It will produce a fancy listing in much X the same spirit as vgrind. If the output file is X not specified, the default is standard output, X rather than formatting in place. X X -v,-nv -v turns on `60verbose' mode, -nv turns it off. X When in verbose mode, indent reports when it X splits one line of input into two or more lines of X output, and gives some size statistics at comple- X tion. The default is -nv. X X -+ turns on support for C++. In c++ mode, :: is per- X mited in identifiers, C++ keywords are supported, X and class definition keywords (public, private, X etc.) are set in column 2. X X FURTHER DESCRIPTION X X You may set up your own `60profile' of defaults to indent by creat V- X ing a file called indent.pro in either your login directory or X the current directory and including whatever switches you like. X A `60indent.pro' in the current directory takes precedence over X the one in your login directory. If indent is run and a profile X file exists, then it is read to set up the program's defaults. X Switches on the command line, though, always override profile X switches. The switches should be separated by spaces, tabs or X newlines. X X Comments X X If -cdb is specified, INDENT assumes that any comment with a dash X or star immediately after the start of comment (that is, `60/*-' o Vr X `60/**') is a comment surrounded by a box of stars. Each line of X such a comment is left unchanged, except that its indentation may X be adjusted to account for the change in indentation of the first X line of the comment. X X Straight text. All other comments are treated as straight text. X Indent fits as many words (separated by blanks, tabs, or new- X lines) on a line as possible. Blank lines break paragraphs. X X Comment indentation X X If a comment is on a line with code it is started in the `60commen Vt X column', which is set by the -cn command line parameter. Other- X wise, the comment is started at n indentation levels less than X where code is currently being placed, where n is specified by the X -dn command line parameter. If the code on a line extends past X the comment column, the comment starts further to the right, and X the right margin may be automatically extended in extreme cases. X X Special Comments X X Indent produces and interprets some special comments. When X indent cannot parse the source, it prints a message on standard X error and inserts a comment into the output of the form X /**INDENT** ErrorMessage */ X X Indent interprets several special comments as directives. First, X it makes no attempt to format lines containing the error comment X described above. X X Second, lines of the form: X /* INDENT OFF */ X or X /* INDENT ON */ X disable and re-enable indent formatting. Any amount of whitespace X may replace the spaces shown in the examples. X X Third, indent allows formatting controls to be included in the X source via comments of the form: X /* INDENT: arg1 arg2 arg3 ... arg4 */ X The arguments given are in the same syntax as the command line or X profile file. For example: X /* INDENT: -cli.25 -nfc1 */ X X Preprocessor lines X X In general, indent leaves preprocessor lines alone. The only X reformmatting that it will do is to straighten up trailing com- X ments. It leaves imbedded comments alone. Conditional compila- X tion (#ifdef...#endif) is recognized and indent attempts to X correctly compensate for the syntactic peculiarites introduced. X X C syntax X X Indent understands a substantial amount about the syntax of C, X but it has a `60forgiving' parser. It attempts to cope with the X usual sorts of incomplete and misformed syntax. In particular, X the use of macros like: X #define forever for(;;) X is handled properly. X X FILES X indent.pro profile file X X BUGS X Some of the above feature may not be present. If there is`20 X feature which is not working or one that you would like to X see, please contact MRL. X X A common mistake that often causes grief is typing: X indent *.c X to the shell in an attempt to indent all the C programs in a X directory. This is probably a bug, not a feature. $ CALL UNPACK INDENT.HLP;9 2068147366 $ create 'f' X$LINK INDENT,IO,LEXI,PARSE, PR_COMMENT,ARGS,SYS$INPUT/OPT XSYS$SHARE:VAXCRTL/SHARE $ CALL UNPACK INDENT.LNK;3 575685748 $ create 'f' X#`09@(#)Makefile`095.11 (Berkeley) 5/11/90 X XPROG=`09indent XSRCS=`09indent.c io.c lexi.c parse.c pr_comment.c args.c X X.include $ CALL UNPACK MAKEFILE.;1 1362850497 $ create 'f' XThis is the C indenter, it originally came from the University of Illinois Xvia some distribution tape for PDP-11 Unix. It has subsequently been Xhacked upon by James Gosling @ CMU. It isn't very pretty, and really needs Xto be completely redone, but it is probably the nicest C pretty printer Xaround. X XFurther additions to provide "Kernel Normal Form" were contributed Xby the folks at Sun Microsystems. X X++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ X> From mnetor!yunexus!oz@uunet.UU.NET Wed Mar 9 15:30:55 1988 X> Date: Tue, 8 Mar 88 18:36:25 EST X> From: yunexus!oz@uunet.UU.NET (Ozan Yigit) X> To: bostic@okeeffe.berkeley.edu X> Cc: ccvaxa!willcox@uunet.UU.NET, jag@sun.com, rsalz@uunet.UU.NET X> In-Reply-To: Keith Bostic's message of Tue, 16 Feb 88 16:09:06 PST`20 X> Subject: Re: Indent... X XThank you for your response about indent. I was wrong in my original Xobservation (or mis-observation :-). UCB did keep the Illinois Xcopyright intact. X XThe issue still is whether we can distribute indent, and if we can, which Xversion. David Willcox (the author) states that: X X`7C Several people have asked me on what basis I claim that indent is in X`7C the public domain. I knew I would be sorry I made that posting. X`7C`20 X`7C Some history. Way back in 1976, the project I worked on at the X`7C University of Illinois Center for Advanced Computation had a huge X`7C battle about how to format C code. After about a week of fighting, I X`7C got disgusted and wrote a program, which I called indent, to reformat C X`7C code. It had a bunch of different options that would let you format X`7C the output the way you liked. In particular, all of the different X`7C formats being championed were supported. X`7C`20 X`7C It was my first big C program. It was ugly. It wasn't designed, it X`7C just sort of grew. But it pretty much worked, and it stopped most of X`7C the fighting. X`7C`20 X`7C As a matter of form, I included a University of Illinois Copyright X`7C notice. However, my understanding was that, since the work was done X`7C on an ARPA contract, it was in the public domain. X`7C`20 X`7C Time passed. Some years later, indent showed up on one of the early X`7C emacs distributions. X`7C`20 X`7C Later still, someone from UC Berlekey called the UofI and asked if X`7C indent was in the public domain. They wanted to include it in their X`7C UNIX distributions, along with the emacs stuff. I was no longer at the X`7C UofI, but Rob Kolstad, who was, asked me about it. I told him I didn't X`7C care if they used it, and since then it has been on the BSD distribution Vs. X`7C`20 X`7C Somewhere along the way, several other unnamed people have had their X`7C hands in it. It was converted to understand version 7 C. (The X`7C original was version 6.) It was converted from its original filter X`7C interface to its current "blow away the user's file" interface. X`7C The $HOME/.indent.pro file parsing was added. Some more formatting X`7C options were added. X`7C`20 X`7C The source I have right now has two copyright notices. One is the X`7C original from the UofI. One is from Berkeley. X`7C`20 X`7C I am not a lawyer, and I certainly do not understand copyright law. As X`7C far as I am concerned, the bulk of this program, everything covered by X`7C the UofI copyright, is in the public domain, and worth every penny. X`7C Berkeley's copyright probably should only cover their changes, and I X`7C don't know their feelings about sending it out. `20 X XIn any case, there appears to be noone at UofI to clarify/and change Xthat copyright, but I am confident (based on the statements of its Xauthor) that the code, as it stands with its copyright, is Xdistributable, and will not cause any legal problems. X XHence, the issue reduces to *which* one to distribute through Xcomp.sources.unix. I would suggest that with the permission of you Xfolks (given that you have parts copyrighted), we distribute the 4.3 Xversion of indent, which appears to be the most up-to-date version. I Xhappen to have just about every known version of indent, including the Xvery original submission from the author to a unix tape, later the XG-Emacs version, any 4.n version, sun version and the Unipress Xversion. I still think we should not have to "go-back-in-time" and Xre-do all the work you people have done. X XI hope to hear from you as to what you think about this. You may of Xcourse send 4.3 version to the moderator directly, or you can let me Xknow of your permission, and I will send the sources, or you can let Xme know that 4.3 version is off-limits, in which case we would probably Xhave to revert to an older version. One way or another, I hope to get Xa version of indent to comp.sources.unix. X Xregards..`09oz X Xcc: ccvaxa!willcox X sun.com!jar X uunet!rsalz X $ CALL UNPACK README.;1 778007636 $ v=f$verify(v) $ EXIT