The NetBSD Project

CVS log for src/tests/usr.bin/indent/lsym_comment.c

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.25: download - view: text, markup, annotated - select for diffs
Fri Jan 3 23:37:18 2025 UTC (3 months, 3 weeks ago) by rillig
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +3 -2 lines
indent: fix line breaks in else-if sequences

The flag ps.want_newline did not adequately model the conditions under
which a line break should be inserted, thus the redesign.

A welcome side effect is that in statements like 'if (cond);', the
semicolon is now placed on a separate line, thus becoming more visible.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Fri Jun 23 20:59:04 2023 UTC (22 months, 1 week ago) by rillig
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +3 -5 lines
indent: fix scanning of no-wrap comments (since 2021.11.07.10.34.03)

The "refactoring" back then tried to be too clever.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Sun Jun 18 07:10:24 2023 UTC (22 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +1 -2 lines
indent: remove support for backspace in code and comments

The C code in the whole tree does not contain a single literal
backspace.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sat Jun 17 22:09:24 2023 UTC (22 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +52 -1 lines
tests/indent: add miscellaneous test cases found during clean up

Revision 1.21: download - view: text, markup, annotated - select for diffs
Wed Jun 14 09:31:05 2023 UTC (22 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +17 -4 lines
indent: clean up handling of comments

One less moving part in the parser state.

No functional change.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Sat Jun 10 16:43:56 2023 UTC (22 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +22 -2 lines
indent: miscellaneous cleanups

Revision 1.19: download - view: text, markup, annotated - select for diffs
Sat Jun 10 06:38:21 2023 UTC (22 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +2 -2 lines
indent: rename and sort variables in parser state

No functional change.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Tue Jun 6 07:51:35 2023 UTC (22 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +14 -4 lines
indent: right-trim single-line comments

Revision 1.17: download - view: text, markup, annotated - select for diffs
Tue Jun 6 05:39:49 2023 UTC (22 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +20 -1 lines
tests/indent: comments with trailing whitespace may fit in a single line

Revision 1.16: download - view: text, markup, annotated - select for diffs
Mon Jun 5 08:22:00 2023 UTC (22 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +5 -6 lines
indent: fix trailing whitespace after comment

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sun May 21 10:18:44 2023 UTC (23 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +19 -26 lines
tests/indent: fix outdated or wrong comments

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sat May 20 11:19:17 2023 UTC (23 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -1 lines
indent: implement blank line above block comment

Revision 1.13: download - view: text, markup, annotated - select for diffs
Tue May 16 11:32:02 2023 UTC (23 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +6 -14 lines
indent: remove support for form feed characters inside a line

Form feeds are occasionally used to split code into pages, and this use
is still supported.  Having a form feed in the middle of a line is
exotic.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Mon May 15 20:30:20 2023 UTC (23 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +20 -1 lines
indent: fix duplicate space between comment and binary operator

Revision 1.11: download - view: text, markup, annotated - select for diffs
Mon May 15 19:55:51 2023 UTC (23 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +20 -9 lines
indent: fix line wrapping of comments to the right of code

Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon May 15 07:28:45 2023 UTC (23 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +1 -13 lines
indent: clean up memory and buffer management

Remove the need to explicitly initialize the buffers.  To avoid
subtracting null pointers or comparing them using '<', migrate the
buffers from the (start, end) form to the (start, len) form.  This form
also avoids inconsistencies in whether 'buf.e == buf.s' or 'buf.s ==
buf.e' is used.

Make buffer.st const, to avoid accidental modification of the buffer's
content.

Replace '*buf.e++ = ch' with buf_add_char, to avoid having to keep track
how much unwritten space is left in the buffer.  Remove all safety
margins, that is, no more unchecked access to buf.st[-1] or appending
using '*buf.e++'.

Fix line number counting in lex_word for words that contain line breaks.

No functional change.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sun May 14 22:26:37 2023 UTC (23 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +1 -15 lines
indent: only null-terminate the buffers if necessary

The only case where a buffer is used as a C-style string is when looking
up a keyword.

No functional change.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun May 14 17:53:38 2023 UTC (23 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +5 -4 lines
indent: fix handling of multiple block comments in a line

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sat May 13 16:40:18 2023 UTC (23 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +5 -5 lines
indent: do not add a space before a comment that starts a line

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat May 13 06:52:48 2023 UTC (23 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -2 lines
tests/indent: explain, clean up and add some tests

Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu May 11 09:28:53 2023 UTC (23 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +3 -4 lines
indent: remove buggy code for swapping tokens

It is not the job of an indenter to swap tokens, even if it's only about
placing comments elsewhere.  The code that swapped the tokens was
complicated, buggy and impossible to understand.

In -br (brace right) mode, indent no longer moves a '{' from the
beginning of a line to the end of the previous line, as that was handled
by the token swapping code as well.  This change is unintended, but it
will be easier to re-add that now that the code is simpler.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sun Apr 24 10:36:37 2022 UTC (3 years 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.3: preferred, colored
Changes since revision 1.3: +1079 -2 lines
tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun Apr 24 09:04:12 2022 UTC (3 years ago) by rillig
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +4 -4 lines
tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Fri Apr 22 21:21:20 2022 UTC (3 years ago) by rillig
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +1 -2 lines
indent: remove FreeBSD IDs

Most of the IDs were empty anyway.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Thu Nov 18 21:19:19 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack.  They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests.  This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.

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>