Commit Graph

25 Commits

Author SHA1 Message Date
charnier
2318032d41 initialize variable (WARNS=6) 2006-09-13 05:06:12 +00:00
dwmalone
e31bf402f9 Declare find_err in indent_globs.h where the other shared variables
live rather than listing it as an extern in indent.c.
2005-11-13 20:37:25 +00:00
schweikh
3a2780ff6e 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
bde
230bb0491d 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
bde
fb0b5ce61d 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
bde
db87815c12 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
bde
801e658cdd 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
charnier
d46a4b84c3 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
schweikh
d3367c5f5d Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
charnier
1e67ecad50 Spelling 2002-10-16 13:58:39 +00:00
obrien
bc61fc95d8 Consistently use FBSDID 2002-06-30 05:25:07 +00:00
jmallett
a7ebe6f544 Remove deprecated register qualifier. 2002-06-24 17:40:27 +00:00
dwmalone
99e772806a 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
schweikh
ff38fb0e73 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
obrien
30bb5dedca 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
asmodai
3065478332 Preceed/preceeding are not english words. Use precede and preceding. 2001-02-18 10:43:53 +00:00
obrien
2f37ea4d17 Don't abuse the SCCS `@(#)' for RCS.
Requested by:	bde
2000-12-25 01:16:12 +00:00
obrien
e5081ac94e Add or fix FreeBSD IDs. 2000-12-09 09:52:52 +00:00
obrien
ae466e022e "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
74a1be3402 Don't call err() with no format string. 2000-07-10 09:14:15 +00:00
peter
3b842d34e8 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
billf
4822432874 Clean up some ambiguous nested if/elses. 1999-07-04 17:26:16 +00:00
thepish
2b6c28f287 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
charnier
bc62cc22d4 Use err(3) instead of local redefinition. Add usage(). 1997-07-15 09:50:59 +00:00
rgrimes
f9ab90d9d6 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00