Commit Graph

23 Commits

Author SHA1 Message Date
Jens Schweikhardt
e3625e9c22 Fix problems with non-8 space tabs. New options for function
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
2004-06-27 10:58:37 +00:00
Bruce Evans
88ce0e7f7e Added an option -ldi<N> to control indentation of local variable names.
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>.
2004-02-09 21:48:51 +00:00
Bruce Evans
7b3b38c6db Only use tabs to indent variable names if the declaration indent is
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.
2004-02-09 20:42:08 +00:00
Bruce Evans
eebee5a754 Backed out a part of previous commit that wasn;t mentioned in the log
message and wasn't quite ready (it avoided indenting the names of local
variables).
2004-02-09 20:26:27 +00:00
Bruce Evans
e024a09064 Fixed tab lossage in indented variable names. The -diN option was
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.
2004-02-09 15:57:35 +00:00
Philippe Charnier
d005495293 err() on allocation failure. WARNS=9 compliant
use #if 0, #ifndef lint, #endif /* not lint */, #endif ordering
when a message is provided, use errx() instead of err().
2003-06-15 09:28:17 +00:00
Jens Schweikhardt
9d5abbddbf Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
Philippe Charnier
dc51023cb3 Spelling 2002-10-16 13:58:39 +00:00
David E. O'Brien
e026a48c34 Consistently use FBSDID 2002-06-30 05:25:07 +00:00
Juli Mallett
90af6a724e Remove deprecated register qualifier. 2002-06-24 17:40:27 +00:00
David Malone
8c7e769852 1) Const enough things to avoid warnings.
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.
2002-03-30 17:10:20 +00:00
Jens Schweikhardt
7916863d82 Make this compile cleanly when warnings are enabled:
- 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
2001-10-28 18:35:32 +00:00
David E. O'Brien
52608c9fbf Fix indent endless on garbage input (i.e., if it encountered EOF while
waiting for a '}' nesting terminator)

Obtained from:	OpenBSD rev 1.8
2001-02-27 20:50:34 +00:00
Jeroen Ruigrok van der Werven
d7d97eb0aa Preceed/preceeding are not english words. Use precede and preceding. 2001-02-18 10:43:53 +00:00
David E. O'Brien
175f26d6ed Don't abuse the SCCS `@(#)' for RCS.
Requested by:	bde
2000-12-25 01:16:12 +00:00
David E. O'Brien
9e50dd7726 Add or fix FreeBSD IDs. 2000-12-09 09:52:52 +00:00
David E. O'Brien
a5e1cac0f5 "Implement -[n]fcb (formatting of block comments) and attempt to implement
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
2000-12-09 09:45:09 +00:00
Kris Kennaway
0c4d24a78f Don't call err() with no format string. 2000-07-10 09:14:15 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Bill Fumerola
9ef5c48bef Clean up some ambiguous nested if/elses. 1999-07-04 17:26:16 +00:00
Peter Hawkins
18251d7146 PR: 7583
Submitted by:	Dave Glowacki <dglo@SSEC.WISC.EDU>
Support input via stdin if no input file name specified explicitly
1998-10-18 04:46:24 +00:00
Philippe Charnier
958d7c9f1d Use err(3) instead of local redefinition. Add usage(). 1997-07-15 09:50:59 +00:00
Rodney W. Grimes
9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00