| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a very visible issue that may be hidden by some indent.pro
settings as in the example from FreeBSD's /usr/share.
From Piotr's log:
____
To prevent losing tabs from indentation in declarations, FreeBSD indent's
r125624 added code for the most common case when it's an identifier that
is indented, but didn't do anything with the original code that did the
same for any other cases. The other cases are: lparens (function pointer
declaration), asterisks (pointer declaration), stray semicolons, and
commas leading identifiers instead of trailing them.
Use the code added in r125624 (and improved in later commits) to write a
new function indent_declaration() and use it in all places that meant to
indent declarations. In order to indent only once per line, reuse existing
ps.dumped_decl_indent variable that was only used when formatting for
troff (-troff) until now.
____
Reference:
https://github.com/pstef/freebsd_indent/commit/ddd263db2a59978f43468989eff65299cf3ce7e1
Differential Revision: https://reviews.freebsd.org/D6966 (Partial)
Submitted by: Piotr Stefaniak
Notes:
svn path=/head/; revision=303570
|
|
|
|
|
|
|
|
| |
MFC after: 2 weeks.
Sponsored by: gandi.net (BSD Day Taiwan)
Notes:
svn path=/head/; revision=303547
|
|
|
|
|
|
|
|
|
|
|
| |
strchr(3) returns a pointer not a boolean.
Attempt to make the style somewhat more ocnsistent with what indent
had before recent changes.
Pointed out by: bde
Notes:
svn path=/head/; revision=303525
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the excessive braces from r303485 and align the comments to the
right as done in the rest of the code. This is not nice but there is no
clear way to make it nice (and KNF).
Pointed out by: bde
Notes:
svn path=/head/; revision=303523
|
|
|
|
| |
Notes:
svn path=/head/; revision=303502
|
|
|
|
|
|
|
|
|
|
| |
Semicolons inside struct declarations don't end the declarations.
Differential Revision: https://reviews.freebsd.org/D6966 (Partial)
Obtained from: Piotr Stefaniak
Notes:
svn path=/head/; revision=303485
|
|
|
|
|
|
|
|
|
|
|
|
| |
indent(1) simply wasn't taught that "else" may be followed by a comment
without any opening brace anywhere on the line, so it was very confused
in such cases.
Differential Revision: https://reviews.freebsd.org/D6966 (Partial)
Obtained from: Piotr Stefaniak
Notes:
svn path=/head/; revision=303484
|
|
|
|
|
|
|
|
|
|
| |
dump_line() requires s_code to be a string, because it will call count_spaces().
Differential Revision: https://reviews.freebsd.org/D6966 (Partial)
Obtained from: Piotr Stefaniak
Notes:
svn path=/head/; revision=303482
|
|
|
|
|
|
|
|
|
|
| |
negative_returns: n is passed to a parameter that cannot be negative.
Fix a style issue while here.
CID: 1008107
Notes:
svn path=/head/; revision=303452
|
|
|
|
| |
Notes:
svn path=/head/; revision=228992
|
|
|
|
| |
Notes:
svn path=/head/; revision=211132
|
|
|
|
|
|
|
|
| |
Obtained from: NetBSD (rev. 1.11 of indent.c)
MFC after: 1 week
Notes:
svn path=/head/; revision=205988
|
|
|
|
| |
Notes:
svn path=/head/; revision=162264
|
|
|
|
|
|
|
| |
live rather than listing it as an extern in indent.c.
Notes:
svn path=/head/; revision=152395
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=131184
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>.
Notes:
svn path=/head/; revision=125633
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Notes:
svn path=/head/; revision=125631
|
|
|
|
|
|
|
|
| |
message and wasn't quite ready (it avoided indenting the names of local
variables).
Notes:
svn path=/head/; revision=125629
|
|
|
|
|
|
|
|
|
|
| |
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.
Notes:
svn path=/head/; revision=125624
|
|
|
|
|
|
|
|
| |
use #if 0, #ifndef lint, #endif /* not lint */, #endif ordering
when a message is provided, use errx() instead of err().
Notes:
svn path=/head/; revision=116390
|
|
|
|
|
|
|
| |
especially in troff files.
Notes:
svn path=/head/; revision=108533
|
|
|
|
| |
Notes:
svn path=/head/; revision=105244
|
|
|
|
| |
Notes:
svn path=/head/; revision=99112
|
|
|
|
| |
Notes:
svn path=/head/; revision=98771
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Notes:
svn path=/head/; revision=93440
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
Notes:
svn path=/head/; revision=85632
|
|
|
|
|
|
|
|
|
| |
waiting for a '}' nesting terminator)
Obtained from: OpenBSD rev 1.8
Notes:
svn path=/head/; revision=73175
|
|
|
|
| |
Notes:
svn path=/head/; revision=72645
|
|
|
|
|
|
|
| |
Requested by: bde
Notes:
svn path=/head/; revision=70342
|
|
|
|
| |
Notes:
svn path=/head/; revision=69796
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=69795
|
|
|
|
| |
Notes:
svn path=/head/; revision=62894
|
|
|
|
| |
Notes:
svn path=/head/; revision=50477
|
|
|
|
| |
Notes:
svn path=/head/; revision=48566
|
|
|
|
|
|
|
|
| |
Submitted by: Dave Glowacki <dglo@SSEC.WISC.EDU>
Support input via stdin if no input file name specified explicitly
Notes:
svn path=/head/; revision=40502
|
|
|
|
| |
Notes:
svn path=/head/; revision=27419
|
|
Notes:
svn path=/cvs2svn/branches/CHRISTOS/; revision=1590
|