summaryrefslogtreecommitdiffstats
path: root/usr.bin/indent
Commit message (Collapse)AuthorAgeFilesLines
* Fix all the spelling mistakes I could find in the man pages for wordskeramida2005-07-311-2/+2
| | | | | | | | that have at least 3 characters. MFC after: 1 week Thanks to: Music band ``Chingon'' for keeping me company while searching for these.
* Expand contractions.ru2005-02-131-2/+2
|
* Expand *n't contractions.ru2005-02-131-2/+2
|
* Quote example file names consistently, and fix a small grammatical nit.ceri2005-02-041-2/+2
|
* Clarify a bit the BUGS section.keramida2005-02-031-4/+3
| | | | | | PR: docs/77024 Submitted by: Adrian Filipi <adrian@ubergeeks.com> Reviewed by: ru
* Fix a buffer overflow by using strncpy() instead of strcpy().das2004-09-191-4/+4
| | | | | | Also, use strdup() instead of malloc()/strcpy(). PR: 64164
* Deal with double whitespace.ru2004-07-031-23/+23
|
* Mechanically kill hard sentence breaks.ru2004-07-021-50/+100
|
* Bump document date.schweikh2004-06-301-1/+1
| | | | Submitted by: ru
* Document recently acquired options.schweikh2004-06-291-0/+12
| | | | | | PR: 67983 Submitted by: Chip Norkus <wd@teleri.net> MFC after: 2 weeks
* Fix problems with non-8 space tabs. New options for functionschweikh2004-06-274-15/+45
| | | | | | | | | | | declarations with the opening brace on the same line as the declaration of arguments all spaces and no tabs (a feature which exists in GNU's indent). Man page update to follow RSN. PR: bin/67983 Submitted by: Chip Norkus <wd@teleri.net> Style guidance and bug for bug compatibility by: bde MFC after: 2 weeks
* Fixed document date.ru2004-05-191-1/+1
|
* Support C-style comments in profile.des2004-03-211-3/+18
|
* Only indent once for continuation lines when not lining up withbde2004-02-122-3/+5
| | | | | | | | | | | | | | parentheses if the continuation indent is exactly half of the main indent. Indenting one contination indent for every level of parentheses gives bad results in most cases and is not what is done in about 90% of properly hand-formatted KNF code (sys/kern/*.c, nvi/common/*.c). The main advantage of the non-default KNF options -nlp -ci4 is that continuation lines don't accidentally line up with the next main indentation level or march to the right, and increasing their indentation defeats this. This behaviour change is limited to when the continuation indent is exactly half of the main indent to avoid adding yet another option.
* Added an option -ldi<N> to control indentation of local variable names.bde2004-02-094-4/+27
| | | | | | | | | | | | The default is to be backwards compatible and non-KNF (use the same indentation for locals as for globals; -ldi0 gives KNF indentation for locals (none)). The indentation for globals also applies to struct member names in local declatations. The indentation of variable names in multi-line declarations is broken in various ways and this commit gives some new variations. indent.1: Also clarified the description of -di<N>.
* Only use tabs to indent variable names if the declaration indent isbde2004-02-091-8/+8
| | | | | | | | nonzero (so that the 1-char indentation given by -di0 is never rendered by a tab). Removed garbage commented out code for setting the indentation of variable names.
* Backed out a part of previous commit that wasn;t mentioned in the logbde2004-02-091-2/+1
| | | | | message and wasn't quite ready (it avoided indenting the names of local variables).
* Fixed tab lossage in indented variable names. The -diN option wasbde2004-02-091-6/+22
| | | | | | | worse than useless because it caused things like mangling of "^int\tfoo" to "int foo" (this for N = 8). This quick fix breaks the invariant that characters between s_code and e_code have width 1, but nothing seems to depend on this.
* Fixed misformatting of "struct foo *bar" in function parameter lists. Itbde2004-02-091-8/+11
| | | | | | | | | | was mangled to "struct foo * bar". There should be an option to control this, but no space is normal. This finishes fixing the bugs in rev.1.4. indent(1) still doesn't really understand types in parameter lists. It thinks keywords inside parentheses are for casts or sizeofs. This works accidentally for scalar types and this quick fix makes it work similarly but not so accidentally for struct/union/enum types.
* Expanded the size of the keyword table from 100 to 1000 entries so thatbde2004-02-091-1/+3
| | | | | | | | | | the number of typedef-names is not so limited. Same as in rev.1.4. Added the "const" and "volatile" to the keyword table. Rev.1.4 added these but they were misclassified so they were not formatted as types. indent still doesn't really understand them. E.g., it mangles "char * const *foo" and "char *const *foo". This change mainly stops it mangling "char const foo" to "char<declaration-indent>const foo".
* Backed out rev.1.4 and 1.7 so they they can be implemented and committedbde2004-02-091-18/+5
| | | | | | | | | | | | | properly. Of the 3 changes mentioned in the log message for rev.1.4, the first (implementing -[n]fcb) was correct but didn't touch this file, the second (no-space-after-sizeof) was not actually done (it is the default and is controlled by the undcoumented -[n]bs options), and the third (no-space-after 'struct foo *') was very buggy and was reduced to wrong comments and other style bugs by backing out the main part of it in rev.1.6. Rev.1.4 had 2 changes which were not mentioned in its commit log: expand specials[] so that more than -83 typedef-names can be specified (this was the one working change in rev.1.4), and add "const" and "volatile" to specials[] (this was buggy).
* err() on allocation failure. WARNS=9 compliantcharnier2003-06-157-21/+46
| | | | | use #if 0, #ifndef lint, #endif /* not lint */, #endif ordering when a message is provided, use errx() instead of err().
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-011-3/+3
| | | | especially in troff files.
* Spellingcharnier2002-10-165-10/+13
|
* Consistently use FBSDIDobrien2002-06-306-14/+16
|
* Remove deprecated register qualifier.jmallett2002-06-247-40/+40
|
* Use `The .Nm utility'charnier2002-04-201-14/+22
|
* 1) Const enough things to avoid warnings.dwmalone2002-03-306-30/+31
| | | | | | | | 2) Cast ifdef_level to a size_t before comparing it to a ratio of size_ts. Ifdef_level should always be positive. 3) Complete prototype for chfont. 4) Cast some ptrdiff_ts to ints before using as a field width. 5) Avoid shadowing a local variable p with another local variable p.
* Make this compile cleanly when warnings are enabled:schweikh2001-10-288-227/+310
| | | | | | | | | | | | | | - ANSIfy function declarations - braces around initializers structs within structs - add parens in complicated expressions - disambiguate dangling elses - no more implicit int - make functions static where possible - use prototypes - don't use varargs hack for diag() Requested by: joerg MFC after: 2 weeks
* Properly handle backslash newline within an identifier or keyword.schweikh2001-10-191-1/+11
| | | | | | | | PR: bin/6015 Submitted by: myself (schweikh) Patch by: Alexey V.Neyman <alex.neyman@auriga.ru> Tested by: indenting my chess problem solver and running its test suite MFC after: 3 weeks
* Remove whitespace at EOL.dd2001-07-151-9/+9
|
* mdoc(7) police: removed HISTORY info from the .Os call.ru2001-07-101-1/+1
|
* Fix damage I did in rev 1.4 that broke formatting this example:obrien2001-04-201-0/+2
| | | | void foo(struct bar *bar) { return 0; }
* Fix indent endless on garbage input (i.e., if it encountered EOF whileobrien2001-02-271-1/+1
| | | | | | waiting for a '}' nesting terminator) Obtained from: OpenBSD rev 1.8
* Preceed/preceeding are not english words. Use precede and preceding.asmodai2001-02-181-1/+1
|
* Don't abuse the SCCS `@(#)' for RCS.obrien2000-12-256-6/+6
| | | | Requested by: bde
* The options I added where not formated to new manpage style specs.obrien2000-12-091-4/+7
|
* Add or fix FreeBSD IDs.obrien2000-12-097-5/+10
|
* "Implement -[n]fcb (formatting of block comments) and attempt to implementobrien2000-12-096-11/+46
| | | | | | | no-space=after-sizeof (not optional) and no-space-after 'struct foo *' (not optional). Without these, indent unKNFizes even more perfectly KNF code." Submitted by: bde
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-3/+2
|
* Avoid use of direct troff requests in mdoc(7) manual pages.ru2000-11-101-7/+0
|
* Don't call err() with no format string.kris2000-07-101-7/+7
|
* Don't depend on the fact that variables default to int.billf1999-09-061-4/+4
|
* $Id$ -> $FreeBSD$peter1999-08-284-4/+4
|
* Add $Id$, to make it simpler for members of the translation teams tonik1999-07-121-0/+1
| | | | | | | | | | | | | | | | | track. The $Id$ line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so; .\" $Id$ .\" If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted. Approved by: bde
* Clean up some ambiguous nested if/elses.billf1999-07-042-7/+9
|
* Improve handling of "do ... while" following "else". This changernordier1999-05-211-1/+1
| | | | eliminates some incorrect "Unmatched 'else'" errors.
* PR: 7583thepish1998-10-181-4/+4
| | | | | Submitted by: Dave Glowacki <dglo@SSEC.WISC.EDU> Support input via stdin if no input file name specified explicitly
* Support integer constant unsigned-suffix and long-long-suffix.rnordier1998-05-191-3/+21
|
* Change defaults to match reality.hoek1997-10-241-15/+17
| | | | PR: docs/3817
OpenPOWER on IntegriCloud