| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
Submitted by: ru
|
|
|
|
|
|
| |
PR: 67983
Submitted by: Chip Norkus <wd@teleri.net>
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
message and wasn't quite ready (it avoided indenting the names of local
variables).
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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".
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
use #if 0, #ifndef lint, #endif /* not lint */, #endif ordering
when a message is provided, use errx() instead of err().
|
|
|
|
| |
especially in troff files.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
| |
void foo(struct bar *bar) { return 0; }
|
|
|
|
|
|
| |
waiting for a '}' nesting terminator)
Obtained from: OpenBSD rev 1.8
|
| |
|
|
|
|
| |
Requested by: bde
|
| |
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
eliminates some incorrect "Unmatched 'else'" errors.
|
|
|
|
|
| |
Submitted by: Dave Glowacki <dglo@SSEC.WISC.EDU>
Support input via stdin if no input file name specified explicitly
|
| |
|
|
|
|
| |
PR: docs/3817
|
| |
|
|
|
|
|
| |
PR: docs/3941
Partially submitted by: uenami@imasy.or.jp
|
|
|
|
|
|
| |
-cli0 -.5
Submitted by: Lars Koeller <Lars_Koeller@odie.physik2.uni-rostock.de>
|
|
|
|
|
|
|
|
| |
man pages.
Masanobu Saitoh <msaitoh@spa.is.uec.ac.jp>
Giles Lean <giles@nemeton.com.au>
<soda@sra.co.jp>
|
| |
|
|
|