The NetBSD Project

CVS log for src/usr.bin/indent/.indent.pro

[BACK] Up to [cvs.NetBSD.org] / src / usr.bin / indent

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.7: download - view: text, markup, annotated - select for diffs
Thu May 18 04:23:03 2023 UTC (23 months, 4 weeks ago) by rillig
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +22 -7 lines
indent: switch to standard code style

Taken from share/misc/indent.pro.

Indent does not wrap code to fit into the line width, it only does so
for comments.  The 'INDENT OFF' sections and too long lines will be
addressed in a follow-up commit.

No functional change.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Tue May 16 12:46:43 2023 UTC (23 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +1 -2 lines
indent: allow comments in column 1 to be formatted

Revision 1.5: download - view: text, markup, annotated - select for diffs
Mon May 15 20:35:56 2023 UTC (2 years ago) by rillig
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -8 lines
indent: clean up local indentation profile

The -eei option now works, the type hints are no longer necessary.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon May 15 09:22:53 2023 UTC (2 years ago) by rillig
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +3 -1 lines
indent: let indent format its own code

With manual corrections, as indent does not properly indent multi-line
'?:' expressions nor multi-line controlling expressions.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Tue Oct 26 19:36:30 2021 UTC (3 years, 6 months ago) by rillig
Branches: MAIN
CVS tags: netbsd-10-base, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +4 -2 lines
indent: run indent on its own source code

With manual corrections afterwards, to compensate for the remaining bugs
in indent.

Without the type definitions in .indent.pro, the opening braces of the
functions kw_name and lexi_alnum would not be at the beginning of the
line.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Oct 5 22:09:05 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -1 lines
indent: run indent on lexi.c, with manual corrections

The variables 'keywords' and 'typenames' were indented using 8 spaces,
even though -di0 was in effect, which should result in a single space,
and -ut was in effect, which should result in a single tab instead of 8
spaces.

The option -eei does not work as advertised, the controlling expressions
are only indented by the normal amount, which easily leads to confusion
as to whether the code belongs to the condition or the following
statement.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Sep 26 19:02:35 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
indent: add .indent.pro that almost matches the source code

One might expect that the code of indent is properly indented according
to its own capabilities, but that's not the case, there are many
deviations.

This indentation profile comes close to the existing code. Maybe someday
indent's own source code can be formatted using this profile, but before
attempting that, its remaining bugs have to be fixed.

Development of indent has essentially stopped somewhere around 1990, as
demonstrated by the wrong formatting of '...' that has only been fixed a
few minutes ago. The '...' is an invention of C90. Indent's parser still
considers '...' as consisting of the 3 tokens period-period-period, but
that's OK since the effect is the same.

Another feature that had been missing for a long time were C99 comments
that span from '//' to the next newline. Before March 2021, these were
parsed as a binary operator, which produced lots of funny side effects.

Since indent's code makes use of several C99 features, as soon as it can
properly indent its own code, the worst of these bugs will have been
fixed.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>