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


Default branch: MAIN


Revision 1.24 / (download) - annotate - [select for diffs], Fri Jun 23 20:59:04 2023 UTC (8 months, 1 week ago) by rillig
Branch: MAIN
CVS Tags: HEAD
Changes since 1.23: +3 -5 lines
Diff to previous 1.23 (colored)

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) - annotate - [select for diffs], Sun Jun 18 07:10:24 2023 UTC (8 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.22: +1 -2 lines
Diff to previous 1.22 (colored)

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) - annotate - [select for diffs], Sat Jun 17 22:09:24 2023 UTC (8 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.21: +52 -1 lines
Diff to previous 1.21 (colored)

tests/indent: add miscellaneous test cases found during clean up

Revision 1.21 / (download) - annotate - [select for diffs], Wed Jun 14 09:31:05 2023 UTC (8 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.20: +17 -4 lines
Diff to previous 1.20 (colored)

indent: clean up handling of comments

One less moving part in the parser state.

No functional change.

Revision 1.20 / (download) - annotate - [select for diffs], Sat Jun 10 16:43:56 2023 UTC (8 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.19: +22 -2 lines
Diff to previous 1.19 (colored)

indent: miscellaneous cleanups

Revision 1.19 / (download) - annotate - [select for diffs], Sat Jun 10 06:38:21 2023 UTC (8 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

indent: rename and sort variables in parser state

No functional change.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Jun 6 07:51:35 2023 UTC (8 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.17: +14 -4 lines
Diff to previous 1.17 (colored)

indent: right-trim single-line comments

Revision 1.17 / (download) - annotate - [select for diffs], Tue Jun 6 05:39:49 2023 UTC (8 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.16: +20 -1 lines
Diff to previous 1.16 (colored)

tests/indent: comments with trailing whitespace may fit in a single line

Revision 1.16 / (download) - annotate - [select for diffs], Mon Jun 5 08:22:00 2023 UTC (8 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.15: +5 -6 lines
Diff to previous 1.15 (colored)

indent: fix trailing whitespace after comment

Revision 1.15 / (download) - annotate - [select for diffs], Sun May 21 10:18:44 2023 UTC (9 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.14: +19 -26 lines
Diff to previous 1.14 (colored)

tests/indent: fix outdated or wrong comments

Revision 1.14 / (download) - annotate - [select for diffs], Sat May 20 11:19:17 2023 UTC (9 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.13: +2 -1 lines
Diff to previous 1.13 (colored)

indent: implement blank line above block comment

Revision 1.13 / (download) - annotate - [select for diffs], Tue May 16 11:32:02 2023 UTC (9 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.12: +6 -14 lines
Diff to previous 1.12 (colored)

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) - annotate - [select for diffs], Mon May 15 20:30:20 2023 UTC (9 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.11: +20 -1 lines
Diff to previous 1.11 (colored)

indent: fix duplicate space between comment and binary operator

Revision 1.11 / (download) - annotate - [select for diffs], Mon May 15 19:55:51 2023 UTC (9 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.10: +20 -9 lines
Diff to previous 1.10 (colored)

indent: fix line wrapping of comments to the right of code

Revision 1.10 / (download) - annotate - [select for diffs], Mon May 15 07:28:45 2023 UTC (9 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.9: +1 -13 lines
Diff to previous 1.9 (colored)

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) - annotate - [select for diffs], Sun May 14 22:26:37 2023 UTC (9 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.8: +1 -15 lines
Diff to previous 1.8 (colored)

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) - annotate - [select for diffs], Sun May 14 17:53:38 2023 UTC (9 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.7: +5 -4 lines
Diff to previous 1.7 (colored)

indent: fix handling of multiple block comments in a line

Revision 1.7 / (download) - annotate - [select for diffs], Sat May 13 16:40:18 2023 UTC (9 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.6: +5 -5 lines
Diff to previous 1.6 (colored)

indent: do not add a space before a comment that starts a line

Revision 1.6 / (download) - annotate - [select for diffs], Sat May 13 06:52:48 2023 UTC (9 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

tests/indent: explain, clean up and add some tests

Revision 1.5 / (download) - annotate - [select for diffs], Thu May 11 09:28:53 2023 UTC (9 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.4: +3 -4 lines
Diff to previous 1.4 (colored)

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) - annotate - [select for diffs], Sun Apr 24 10:36:37 2022 UTC (22 months, 1 week ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.3: +1079 -2 lines
Diff to previous 1.3 (colored)

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) - annotate - [select for diffs], Sun Apr 24 09:04:12 2022 UTC (22 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.2: +4 -4 lines
Diff to previous 1.2 (colored)

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) - annotate - [select for diffs], Fri Apr 22 21:21:20 2022 UTC (22 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.1: +1 -2 lines
Diff to previous 1.1 (colored)

indent: remove FreeBSD IDs

Most of the IDs were empty anyway.

Revision 1.1 / (download) - annotate - [select for diffs], Thu Nov 18 21:19:19 2021 UTC (2 years, 3 months ago) by rillig
Branch: 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.

This form allows you to request diff's 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.




CVSweb <webmaster@jp.NetBSD.org>