Add -sac (space after cast) and -nsac options.
These control whether space character is put after a cast operator or not.
Default is -nsac.
Add -U option for providing a file containing list of types.
This is needed for properly deciding which asterisks denote unary
operation and which denote binary.
These come from PostgreSQL.
Reference:
84b00e3d4649c52cf383
Differential Revision: https://reviews.freebsd.org/D6966 (Partial)
Submitted by: Piotr Stefaniak
For now maintain the local style in this file.
Reviewed by: jilles
Reference:
9099a9f17b
Differential Revision: https://reviews.freebsd.org/D6966 (Partial)
Submitted by: Piotr Stefaniak
Also increase the stack size still keeping a conservative value of 256.
This is based on a similar changes done for PostgreSQL which instead
uses a stack size of 1000.
Differential Revision: https://reviews.freebsd.org/D6966 (Partial)
Submitted by: Piotr Stefaniak (with changes)
last_bl is a char pointer that tracks the last blank character in a
comment, which is used for wrapping long comment lines. Since the
underlying array may be reallocated, make sure last_bl is up to date when
that happens.
Differential Revision: https://reviews.freebsd.org/D6966 (Partial)
Obtained from: Piotr Stefaniak
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
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>.
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