#
bd2969a0 |
| 18-May-2017 |
Piotr Pawel Stefaniak <pstef@FreeBSD.org> |
indent(1): Support binary integer literals. This was done by Romain Tartière for PR123553. I initially thought that it would break code like this: #define b00101010 -1 if (0 b00101010) ...
by joinin
indent(1): Support binary integer literals. This was done by Romain Tartière for PR123553. I initially thought that it would break code like this: #define b00101010 -1 if (0 b00101010) ...
by joining 0 and b00101010 together. However, the real problem with that patch was that once it saw a 0, it assumed that the number was base 2, 8 or 16, ignoring base 10 floating point numbers. I fixed that.
I didn't copy the diagnostic part of the original patch as it seems out of scope of implementing binary integer literals formatting.
PR: 123553 Submitted by: romain (original version) Approved by: pfg (mentor)
show more ...
|
#
4f9d94bf |
| 04-Dec-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r309263 through r309518.
|
#
cba6bdf9 |
| 02-Dec-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
indent(1): Do not define opchar unless it will be used.
"opchar" is only used once depending on "undef" macro being defined. Conditionalize it in the same way.
Submitted by: Piotr Sephaniak
|
#
f171328e |
| 02-Dec-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
indent(1): Fix indent's confusion about custom FreeBSD macros.
Teach indent(1) about storage-class specifiers. Don't assume "in_parameter_declaration" state if "in_decl" hasn't been set. Don't set "
indent(1): Fix indent's confusion about custom FreeBSD macros.
Teach indent(1) about storage-class specifiers. Don't assume "in_parameter_declaration" state if "in_decl" hasn't been set. Don't set "in_decl" for storage-class specifiers.
That set of changes helps with recognizing the difference between file scope declarations like this:
static LIST_HEAD(, alq) ald_active; static int ald_shuttingdown = 0; struct thread *ald_thread;
and old style function declarators like this:
static int do_execve(td, args, mac_p) struct thread *td; struct image_args *args; struct mac *mac_p; {
Unfortunately, at the same time this change makes indent(1) require explicit int in declarations like "static a;", in order to understand that it's part of a declaration. On the other hand, declarations like in the first example are no longer indented as if ald_shuttingdown and ald_thread were parameters of a function named LIST_HEAD.
Submitted by: Piotr Stefaniak
show more ...
|
#
33e643f7 |
| 28-Nov-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r309213 through r309262.
|
#
350fcdd5 |
| 27-Nov-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
indent(1): Properly handle the wide string literal and wide char constant L.
indent(1) treated the "L" in "L'a'" as if it were an identifier and forced a space character after it, breaking valid cod
indent(1): Properly handle the wide string literal and wide char constant L.
indent(1) treated the "L" in "L'a'" as if it were an identifier and forced a space character after it, breaking valid code.
PR: 143090 MFC after: 2 weeks
show more ...
|
Revision tags: release/11.0.1, release/11.0.0 |
|
#
ed04e0c3 |
| 25-Aug-2016 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead @ r304815
|
#
7d0ce7aa |
| 23-Aug-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r304537 through r304699.
|
#
8e7c1235 |
| 23-Aug-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
indent(1): Fix off-by-one in control flow leading dead code.
Coverity correctly reported that it's impossible for /comparison/ to be 0 here, because the only way for the for loop to end is by /compa
indent(1): Fix off-by-one in control flow leading dead code.
Coverity correctly reported that it's impossible for /comparison/ to be 0 here, because the only way for the for loop to end is by /comparison/ being < 0.
Fortunately the consequences of this bug weren't severe; for duplicated entries in the typedef names file it would unnecessarily duplicate strings with strdup(), but pointers to those would replace existing ones. So this was a memory leak at worst.
CID: 1361477 Obtained from: Piotr Stephaniak
show more ...
|
#
f3c23ec3 |
| 23-Aug-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
indent(1): Fix memory leaks pointed out by clang-analyzer.
Shift the responsibility of allocating memory for the string duplicate from the caller (set_option, add_typedefs_from_file) to the callee (
indent(1): Fix memory leaks pointed out by clang-analyzer.
Shift the responsibility of allocating memory for the string duplicate from the caller (set_option, add_typedefs_from_file) to the callee (add_typename) as it has more knowledge about when the duplication actually needs to occur.
Taken from: Piotr Stefaniak
show more ...
|
#
27067774 |
| 16-Aug-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r303250 through r304235.
|
#
a6bcfda4 |
| 04-Aug-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
indent(1): Use bsearch() for looking up type keywords.
Reference: https://github.com/pstef/freebsd_indent/commit/f3b8e6e57fd47364b2360b44011a2fad5d11adc7
Submitted by: Piotr Stefaniak Differential
indent(1): Use bsearch() for looking up type keywords.
Reference: https://github.com/pstef/freebsd_indent/commit/f3b8e6e57fd47364b2360b44011a2fad5d11adc7
Submitted by: Piotr Stefaniak Differential Revision: https://reviews.freebsd.org/D6966
show more ...
|
#
771aff0a |
| 04-Aug-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
indent(1): add new -sac and -U options.
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
indent(1): add new -sac and -U options.
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: https://github.com/pstef/freebsd_indent/commit/84b00e3d46dfd6d955b2f481a1f3b275de9ad6d1 https://github.com/pstef/freebsd_indent/commit/49c52cf383fa2a246a1a22c6640a5a21b0f1fd90
Differential Revision: https://reviews.freebsd.org/D6966 (Partial) Submitted by: Piotr Stefaniak
show more ...
|
#
b4939677 |
| 03-Aug-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
indent(1): accept offsetof(3) as a keyword.
Reference: https://github.com/pstef/freebsd_indent/commit/c470e5e2c974aa38450ca4762b93829f7a7bfa4d
Differential Revision: https://reviews.freebsd.org/D69
indent(1): accept offsetof(3) as a keyword.
Reference: https://github.com/pstef/freebsd_indent/commit/c470e5e2c974aa38450ca4762b93829f7a7bfa4d
Differential Revision: https://reviews.freebsd.org/D6966 (Partial) Submitted by: Piotr Stefaniak
show more ...
|
#
70a3049e |
| 01-Aug-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
indent(1): Use a dash in the license headers.
Use of the canonical dash avoids indent(1) from reformatting the license headers.
|
#
e643b783 |
| 30-Jul-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
indent(1): Yet more style issues.
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
|
#
c917a54b |
| 29-Jul-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
indent(1): Use NULL instead of zero for pointers.
|
#
9f827409 |
| 29-Jul-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
indent(1): Support "f" and "F" floating constant suffixes.
Actually this just brings back r303487 with the correct commit log.
Differential Revision: https://reviews.freebsd.org/D6966 (Partial) Ob
indent(1): Support "f" and "F" floating constant suffixes.
Actually this just brings back r303487 with the correct commit log.
Differential Revision: https://reviews.freebsd.org/D6966 (Partial) Obtained from: Piotr Stefaniak
show more ...
|
#
b58cc20a |
| 29-Jul-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
Revert r303487: Wrong commit log.
Will be brought back with the correct log.
|
#
e5302a29 |
| 29-Jul-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
indent(1): fix struct termination detection.
Small style cleanup while here.
Differential Revision: https://reviews.freebsd.org/D6966 (Partial) Obtained from: Piotr Stefaniak
|
#
b6756594 |
| 06-Jun-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
indent(1): Fix typo.
It's typedef, not typdef.
Obtained from: OpenBSD (CVS rev. 1.20) MFC after: 3 days
|
Revision tags: release/10.3.0, release/10.2.0, release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0, release/8.4.0, release/9.1.0, release/8.3.0_cvs, release/8.3.0, release/9.0.0, release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0, release/8.1.0_cvs, release/8.1.0 |
|
#
a4bf5fb9 |
| 28-Apr-2010 |
Kirk McKusick <mckusick@FreeBSD.org> |
Update to current version of head.
|
#
45ebe396 |
| 22-Apr-2010 |
Andriy Gapon <avg@FreeBSD.org> |
MFC r206687: indent(1): don't treat bare '_t' as a type name with -ta
|
#
c27b391b |
| 15-Apr-2010 |
Andriy Gapon <avg@FreeBSD.org> |
indent(1): don't treat bare '_t' as a type name when -ta is used
It seems that identifier "_t" is sometimes used as a variable name, even in our tree. Not that I endorse that, but still it's better
indent(1): don't treat bare '_t' as a type name when -ta is used
It seems that identifier "_t" is sometimes used as a variable name, even in our tree. Not that I endorse that, but still it's better to require at least one character before _t suffix to consider an identifier to be a type name.
Reported by: Alex Vasylenko <lxv@omut.org> MFC after: 1 week
show more ...
|
#
ce749f10 |
| 12-Apr-2010 |
Andriy Gapon <avg@FreeBSD.org> |
MFC r205989: indent(1): new option, -ta, to treat all *_t identifiers as types
|