CVS log for src/usr.bin/indent/pr_comment.c
Up to [cvs.NetBSD.org] / src / usr.bin / indent
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.173: download - view: text, markup, annotated - select for diffs
Sun Dec 3 21:44:42 2023 UTC (12 months, 1 week ago) by rillig
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630,
perseant-exfatfs-base,
perseant-exfatfs,
HEAD
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +35 -35
lines
indent: inline input-related macros
No binary change.
Revision 1.172: download - view: text, markup, annotated - select for diffs
Sun Dec 3 21:03:58 2023 UTC (12 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +6 -4
lines
indent: use line number of the token start in diagnostics
Previously, the line number of the end of the token was used, which was
confusing in debug mode.
Revision 1.171: download - view: text, markup, annotated - select for diffs
Fri Jun 23 20:59:04 2023 UTC (17 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +8 -7
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.170: download - view: text, markup, annotated - select for diffs
Sun Jun 18 07:32:33 2023 UTC (17 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +4 -4
lines
indent: only add blank lines before actual block comments
Revision 1.169: download - view: text, markup, annotated - select for diffs
Sun Jun 18 07:10:24 2023 UTC (17 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +3 -3
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.168: download - view: text, markup, annotated - select for diffs
Sat Jun 17 23:03:20 2023 UTC (17 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +15 -15
lines
indent: clean up
Extract duplicate code for handling line continuations.
Prevent theoretic undefined behavior in strspn, as inp.s is not
null-terminated.
Remove adding extra space characters when processing comments, as these
are not necessary to force a line of output.
No functional change.
Revision 1.167: download - view: text, markup, annotated - select for diffs
Sat Jun 17 22:28:49 2023 UTC (17 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +28 -34
lines
indent: miscellaneous cleanups
No binary change.
Revision 1.166: download - view: text, markup, annotated - select for diffs
Fri Jun 16 11:27:49 2023 UTC (17 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +3 -3
lines
indent: rename a field of the parser state
The previous name 'comment_in_first_line' was misleading, as it could
mean that there was a comment in the first line of the file.
No functional change.
Revision 1.165: download - view: text, markup, annotated - select for diffs
Wed Jun 14 14:11:28 2023 UTC (17 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +3 -3
lines
indent: allow more than 20 nested parentheses or brackets
Revision 1.164: download - view: text, markup, annotated - select for diffs
Wed Jun 14 09:31:05 2023 UTC (17 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +24 -28
lines
indent: clean up handling of comments
One less moving part in the parser state.
No functional change.
Revision 1.163: download - view: text, markup, annotated - select for diffs
Wed Jun 14 08:36:51 2023 UTC (17 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +11 -9
lines
indent: remove another flag from parser state
When processing a comment, the flag ps.next_col_1 was not used for the
next token, but for a line within a comment. As its scope was limited
to a single comment, there is no need to store it any longer than that
No functional change.
Revision 1.162: download - view: text, markup, annotated - select for diffs
Wed Jun 14 08:25:15 2023 UTC (17 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +3 -3
lines
indent: remove a redundant flag from the parser state
No functional change.
Revision 1.161: download - view: text, markup, annotated - select for diffs
Sat Jun 10 16:43:56 2023 UTC (18 months ago) by rillig
Branches: MAIN
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +3 -3
lines
indent: miscellaneous cleanups
Revision 1.160: download - view: text, markup, annotated - select for diffs
Sat Jun 10 12:59:31 2023 UTC (18 months ago) by rillig
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +4 -3
lines
indent: in debug mode, null-terminate buffers
Revision 1.159: download - view: text, markup, annotated - select for diffs
Sat Jun 10 06:38:21 2023 UTC (18 months ago) by rillig
Branches: MAIN
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +3 -3
lines
indent: rename and sort variables in parser state
No functional change.
Revision 1.158: download - view: text, markup, annotated - select for diffs
Fri Jun 9 07:20:30 2023 UTC (18 months ago) by rillig
Branches: MAIN
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +4 -5
lines
indent: format its own code
Revision 1.157: download - view: text, markup, annotated - select for diffs
Fri Jun 9 07:18:52 2023 UTC (18 months ago) by rillig
Branches: MAIN
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +6 -3
lines
indent: preserve block comments with delimiters
Revision 1.156: download - view: text, markup, annotated - select for diffs
Fri Jun 9 07:04:51 2023 UTC (18 months ago) by rillig
Branches: MAIN
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +14 -18
lines
indent: express more clearly how delimited and no-wrap comments relate
No functional change.
Revision 1.155: download - view: text, markup, annotated - select for diffs
Tue Jun 6 07:51:35 2023 UTC (18 months ago) by rillig
Branches: MAIN
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +11 -2
lines
indent: right-trim single-line comments
Revision 1.154: download - view: text, markup, annotated - select for diffs
Tue Jun 6 07:14:20 2023 UTC (18 months ago) by rillig
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +10 -11
lines
indent: clean up formatting of comments
No functional change.
Revision 1.153: download - view: text, markup, annotated - select for diffs
Tue Jun 6 06:59:39 2023 UTC (18 months ago) by rillig
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +14 -16
lines
indent: simplify handling of comments
No functional change.
Revision 1.152: download - view: text, markup, annotated - select for diffs
Tue Jun 6 06:51:44 2023 UTC (18 months ago) by rillig
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +140 -129
lines
indent: split printing of comments into smaller functions
No functional change.
Revision 1.151: download - view: text, markup, annotated - select for diffs
Sun Jun 4 20:51:19 2023 UTC (18 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +40 -41
lines
indent: remove read pointer from buffers that don't need it
The only buffer that needs a read pointer is the current input line in
'inp'.
No functional change.
Revision 1.150: download - view: text, markup, annotated - select for diffs
Sun Jun 4 20:23:12 2023 UTC (18 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +9 -5
lines
indent: fix out-of-bounds read when reading a comment
Revision 1.149: download - view: text, markup, annotated - select for diffs
Sun May 21 10:18:44 2023 UTC (18 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +3 -4
lines
tests/indent: fix outdated or wrong comments
Revision 1.148: download - view: text, markup, annotated - select for diffs
Sat May 20 11:53:53 2023 UTC (18 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +3 -3
lines
indent: extract the output state from the parser state
The parser state depends on the preprocessing lines, the output state
shouldn't.
Revision 1.147: download - view: text, markup, annotated - select for diffs
Sat May 20 11:19:17 2023 UTC (18 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +4 -2
lines
indent: implement blank line above block comment
Revision 1.146: download - view: text, markup, annotated - select for diffs
Thu May 18 05:33:27 2023 UTC (18 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +26 -18
lines
indent: manually wrap overly long lines
No functional change.
Revision 1.145: download - view: text, markup, annotated - select for diffs
Thu May 18 04:23:03 2023 UTC (18 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +225 -223
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.144: download - view: text, markup, annotated - select for diffs
Tue May 16 13:26:26 2023 UTC (18 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +22 -22
lines
indent: directly access the input buffer
No functional change.
Revision 1.143: download - view: text, markup, annotated - select for diffs
Tue May 16 11:32:01 2023 UTC (18 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +2 -11
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.142: download - view: text, markup, annotated - select for diffs
Mon May 15 19:55:51 2023 UTC (18 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +9 -2
lines
indent: fix line wrapping of comments to the right of code
Revision 1.141: download - view: text, markup, annotated - select for diffs
Mon May 15 09:22:53 2023 UTC (18 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +4 -4
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.140: download - view: text, markup, annotated - select for diffs
Mon May 15 07:28:45 2023 UTC (18 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +37 -34
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.139: download - view: text, markup, annotated - select for diffs
Sun May 14 22:26:37 2023 UTC (18 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +5 -18
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.138: download - view: text, markup, annotated - select for diffs
Sun May 14 18:05:52 2023 UTC (18 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +33 -37
lines
indent: shorten variable names for indenting comments
No functional change.
Revision 1.137: download - view: text, markup, annotated - select for diffs
Sun May 14 17:53:38 2023 UTC (18 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +4 -9
lines
indent: fix handling of multiple block comments in a line
Revision 1.136: download - view: text, markup, annotated - select for diffs
Sun May 14 17:13:37 2023 UTC (18 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +6 -6
lines
indent: in comments, keep a leading tab
This kind of comments is used for the CVS IDs at the top of files.
Revision 1.135: download - view: text, markup, annotated - select for diffs
Sun May 14 16:47:06 2023 UTC (18 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +3 -7
lines
indent: fix vertical spacing after declarations
A comment is not supposed to change the state of the 'blank line after
declaration', but it did. The initialization of saved_just_saw_decl was
wrong though since it tried to capture the previous value after it had
already been overwritten.
Revision 1.134: download - view: text, markup, annotated - select for diffs
Sun May 14 14:14:07 2023 UTC (18 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +9 -15
lines
indent: reduce code for scanning tokens
The input line is guaranteed to end with '\n', so there's no need to
carry another pointer around.
No functional change.
Revision 1.133: download - view: text, markup, annotated - select for diffs
Sun May 14 12:12:02 2023 UTC (18 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +2 -10
lines
indent: remove foreign RCS IDs
Revision 1.132: download - view: text, markup, annotated - select for diffs
Sat May 13 14:30:48 2023 UTC (18 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +5 -5
lines
indent: use enum instead of magic numbers for tracking declarations
No functional change.
Revision 1.131: download - view: text, markup, annotated - select for diffs
Sat May 13 12:31:02 2023 UTC (18 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +9 -9
lines
indent: rename struct fields for buffers
No binary change except for assertion line numbers.
Revision 1.130: download - view: text, markup, annotated - select for diffs
Fri May 12 10:53:33 2023 UTC (19 months ago) by rillig
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +2 -3
lines
indent: remove statistics
The numbers from the statistics were wrong.
Revision 1.129: download - view: text, markup, annotated - select for diffs
Thu May 11 18:13:55 2023 UTC (19 months ago) by rillig
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +2 -5
lines
indent: remove broken code for handling blank lines
This fixes several bugs where blank lines were erroneously added or
removed, treating these old bugs for new bugs in different places.
These new bugs are expected to be easier to fix, as the old bugs will
not interfere anymore.
Revision 1.128: download - view: text, markup, annotated - select for diffs
Mon May 9 21:41:49 2022 UTC (2 years, 7 months ago) by rillig
Branches: MAIN
CVS tags: netbsd-10-base,
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.127: preferred, colored
Changes since revision 1.127: +10 -9
lines
indent: clean up control flow, remove Capsicum
No functional change.
Revision 1.127: download - view: text, markup, annotated - select for diffs
Sat Apr 23 06:43:22 2022 UTC (2 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +3 -3
lines
indent: group global variables related to output control
No functional change.
Revision 1.126: download - view: text, markup, annotated - select for diffs
Sat Nov 27 18:37:17 2021 UTC (3 years ago) by rillig
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +13 -13
lines
indent: rename dump functions to output
No functional change.
Revision 1.125: download - view: text, markup, annotated - select for diffs
Fri Nov 26 15:18:18 2021 UTC (3 years ago) by rillig
Branches: MAIN
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +4 -7
lines
indent: add buf_add_range for adding characters to a buffer
No functional change.
Revision 1.124: download - view: text, markup, annotated - select for diffs
Thu Nov 25 21:01:32 2021 UTC (3 years ago) by rillig
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +5 -5
lines
indent: make fits_in_one_line independent of ps
This makes it easier to understand the function. Having the dependency
to the input line handling is already complicated enough.
No functional change.
Revision 1.123: download - view: text, markup, annotated - select for diffs
Thu Nov 25 20:44:09 2021 UTC (3 years ago) by rillig
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +2 -10
lines
indent: fix accidentally joined and broken comments (since 2019-04-04)
The fixed version is not perfect as it gets the indentation of the last
line of the first comment wrong, but at least indent doesn't generate
malformed output anymore.
Revision 1.122: download - view: text, markup, annotated - select for diffs
Thu Nov 25 20:14:00 2021 UTC (3 years ago) by rillig
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +14 -2
lines
tests/indent: demonstrate bugs in comment processing
Revision 1.121: download - view: text, markup, annotated - select for diffs
Fri Nov 19 20:23:17 2021 UTC (3 years ago) by rillig
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +3 -4
lines
indent: reduce casts to unsigned char for character classification
No functional change.
Revision 1.120: download - view: text, markup, annotated - select for diffs
Fri Nov 19 18:23:59 2021 UTC (3 years ago) by rillig
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +10 -19
lines
indent: use character input API from pr_comment.c
No functional change.
Revision 1.119: download - view: text, markup, annotated - select for diffs
Fri Nov 19 17:11:46 2021 UTC (3 years ago) by rillig
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +14 -14
lines
indent: replace direct access to the input buffer
This is a preparation for abstracting away all the low-level details of
handling the input. The goal is to fix the current bugs regarding line
number counting, out of bounds memory access, and generally unreadable
code.
No functional change.
Revision 1.118: download - view: text, markup, annotated - select for diffs
Fri Nov 19 15:32:13 2021 UTC (3 years ago) by rillig
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +6 -5
lines
indent: rename input buffer variables
From reading the names 'save_com' and 'sc_end', it was not obvious
enough that these two variables are the limits of the same buffer, the
names were just too unrelated.
No functional change.
Revision 1.117: download - view: text, markup, annotated - select for diffs
Fri Nov 19 15:28:32 2021 UTC (3 years ago) by rillig
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +25 -23
lines
indent: group variables for input handling
No functional change.
Revision 1.116: download - view: text, markup, annotated - select for diffs
Sun Nov 7 18:26:17 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +11 -13
lines
indent: various cleanups
Make several comments more precise.
Rename process_end_of_file to process_eof to match the token name.
Change the order of assignments in analyze_comment to keep the com_ind
computations closer together.
In copy_comment_wrap, use pointer difference instead of pointer addition
to stay away from undefined behavior.
No functional change.
Revision 1.115: download - view: text, markup, annotated - select for diffs
Sun Nov 7 13:38:32 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +2 -4
lines
indent: remove code that accessed out-of-bounds data from buffer
Saving and restoring the exact buffer position had been necessary before
NetBSD pr_comment.c 1.114. The code accessed the buffer data out of the
bounds of [com.s, com.e), which was rather surprising. More
specifically, it accessed com.e[-1] in a case where com.e == com.s,
relying on com.e[-1] being ' ' in most cases and '*' in the case where
the comment delimiter was written to a separate output line.
Make the code easier understandable by only ever accessing the buffer
data in the bounds [buf.s, buf.e).
No functional change.
Revision 1.114: download - view: text, markup, annotated - select for diffs
Sun Nov 7 13:30:15 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +4 -4
lines
indent: only access buffer data in the range [buf.s, buf.e)
No functional change.
Revision 1.113: download - view: text, markup, annotated - select for diffs
Sun Nov 7 12:29:58 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +3 -3
lines
indent: do not expand comment buffer unnecessarily
This may have been a simple typo or a really tricky optimization that
isn't obvious even after studying the code for several months. Either of
these is bad, so use the standard form of resetting the buffer.
No functional change.
Revision 1.112: download - view: text, markup, annotated - select for diffs
Sun Nov 7 11:30:45 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +5 -9
lines
indent: remove dead code in analyze_comment
The case of an otherwise empty line is already handled further above.
Revision 1.111: download - view: text, markup, annotated - select for diffs
Sun Nov 7 11:08:25 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +5 -11
lines
indent: remove dead code from copy_comment_wrap
C99 comments are not wrapped, therefore there is no need to check for
them in copy_comment_wrap.
No functional change.
Revision 1.110: download - view: text, markup, annotated - select for diffs
Sun Nov 7 10:56:06 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +8 -16
lines
indent: move documentation from process_comment to copy_comment_wrap
Revision 1.109: download - view: text, markup, annotated - select for diffs
Sun Nov 7 10:49:31 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +9 -12
lines
indent: clean up process_comment
The assignments to the variables were redundant, they are already done
by analyze_comment.
No functional change.
Revision 1.108: download - view: text, markup, annotated - select for diffs
Sun Nov 7 10:42:58 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +2 -3
lines
indent: remove redundant assignment
At that point, ps.next_col_1 is already false.
No functional change.
Revision 1.107: download - view: text, markup, annotated - select for diffs
Sun Nov 7 10:34:03 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +3 -5
lines
indent: make end of comment detection of nowrap comments simpler
No functional change.
Revision 1.106: download - view: text, markup, annotated - select for diffs
Sun Nov 7 10:31:12 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +6 -12
lines
indent: clean up overcomplicated conditions in copy_comment_nowrap
No functional change.
Revision 1.105: download - view: text, markup, annotated - select for diffs
Sun Nov 7 10:26:43 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +10 -13
lines
indent: skip redundant conditions in copy_comment_nowrap
No functional change.
Revision 1.104: download - view: text, markup, annotated - select for diffs
Sun Nov 7 10:17:39 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +7 -16
lines
indent: clean up copy_comment_nowrap
The action for '\f' was the same as the default action.
Replacing 'switch' with 'if' makes the code shorter.
No functional change.
Revision 1.103: download - view: text, markup, annotated - select for diffs
Sun Nov 7 10:13:26 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +7 -23
lines
indent: make copy_comment_nowrap simpler
Since a nowrap comment is copied unmodified, it need not depend on any
maximum line length.
No functional change.
Revision 1.102: download - view: text, markup, annotated - select for diffs
Sun Nov 7 08:41:13 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +4 -12
lines
indent: remove dead code from process_comment_nowrap
In comments that are preserved, no additional leading ' * ' is inserted.
No functional change.
Revision 1.101: download - view: text, markup, annotated - select for diffs
Sun Nov 7 08:38:27 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +23 -32
lines
indent: remove dead code from copy_comment_wrap
No functional change.
Revision 1.100: download - view: text, markup, annotated - select for diffs
Sun Nov 7 08:31:46 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +10 -71
lines
indent: remove dead code from copy_comment_nowrap
No functional change.
Revision 1.99: download - view: text, markup, annotated - select for diffs
Sun Nov 7 08:24:50 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +145 -4
lines
indent: split copy_comment into wrapping and non-wrapping
These two cases are processed in an almost entirely different way. In
particular, copy_comment_nowrap should copy the comment verbatim, which
is not obvious from the current code, due to the many conditions and the
complex control flow.
No functional change.
Revision 1.98: download - view: text, markup, annotated - select for diffs
Sun Nov 7 07:06:00 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +9 -9
lines
indent: rename 'inbuf' functions to 'inp'
The variable 'inp' used to be named 'inbuf'. Make the function names
correspond to the variable name again.
No functional change.
Revision 1.97: download - view: text, markup, annotated - select for diffs
Fri Nov 5 19:33:28 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +5 -5
lines
indent: rename ps.curr_newline to next_col_1
For symmetry with ps.curr_col_1.
No functional change.
Revision 1.96: download - view: text, markup, annotated - select for diffs
Thu Nov 4 18:38:37 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +4 -4
lines
indent: fix parsing of C99 comments containing '*/'
Revision 1.95: download - view: text, markup, annotated - select for diffs
Thu Nov 4 17:37:03 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +50 -32
lines
indent: split process_comments into separate functions
No functional change.
Revision 1.94: download - view: text, markup, annotated - select for diffs
Wed Nov 3 21:47:35 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +7 -7
lines
indent: inline indentation_after, shorten function name to ind_add
There were only few calls to indentation_after, so inlining it spares
the need to look at yet another function definition. Another effect is
that code.s and code.e appear in the code as a pair now, instead of a
single code.s, making the scope of the function call obvious.
In ind_add, there is no need to check for '\0' anymore since none of the
buffers can ever contain a null character, these are filtered out by
inbuf_read_line.
No functional change.
Revision 1.93: download - view: text, markup, annotated - select for diffs
Sat Oct 30 22:36:07 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +6 -6
lines
indent: rename prev_newline and prev_col_1 to curr
These two flags describe the token that is currently processed.
In process_binary_op, curr_newline can never be true since newline is
not a binary operator, so remove that condition.
No functional change.
Revision 1.92: download - view: text, markup, annotated - select for diffs
Sat Oct 30 18:23:17 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +3 -6
lines
indent: fix bounds check for sc_buf
Some years ago, save_com was an array of characters, used as temporary
storage. When sc_buf was added, this code was forgotten. The bounds
check must be on the array itself, not on an iterator that points
somewhere in that array.
Revision 1.91: download - view: text, markup, annotated - select for diffs
Sat Oct 30 16:57:18 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +3 -4
lines
indent: fix assertion in fits_in_one_line
Revision 1.90: download - view: text, markup, annotated - select for diffs
Fri Oct 29 20:27:42 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +9 -9
lines
indent: merge isblank and is_hspace into ch_isblank
No functional change.
Revision 1.89: download - view: text, markup, annotated - select for diffs
Fri Oct 29 19:12:48 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +8 -5
lines
indent: fix undefined behavior in buffer handling
Adding an arbitrary integer to a pointer may result in an out of bounds
pointer, so replace the addition with a pointer subtraction.
In the buffer handling functions, handle 'buf' and 'l' before 's' and
'e', since they are pairs.
In inbuf_read_line, use 's' instead of 'buf' to make the code easier to
understand for human readers.
No functional change.
Revision 1.88: download - view: text, markup, annotated - select for diffs
Fri Oct 29 17:50:37 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +7 -7
lines
indent: use prev/curr/next to refer to the current token
The word 'last' just didn't match with 'next'.
No functional change.
Revision 1.87: download - view: text, markup, annotated - select for diffs
Tue Oct 26 21:37:27 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +4 -4
lines
indent: clean up process_comment
There is no undefined behavior since the compared characters are always
from the basic execution character set. All other cases are covered by
the condition above for now_len.
Fix debug logging for non-ASCII characters, previously a character was
output as \xffffffc3.
Revision 1.86: download - view: text, markup, annotated - select for diffs
Tue Oct 26 21:23:52 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +18 -19
lines
indent: reduce indentation in process_comment
No functional change.
Revision 1.85: download - view: text, markup, annotated - select for diffs
Tue Oct 26 21:04:03 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +6 -20
lines
indent: make reformatting of comments simpler
No functional change.
Revision 1.84: download - view: text, markup, annotated - select for diffs
Mon Oct 25 00:54:37 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +4 -3
lines
indent: split type token_type into 3 separate types
Previously, token_type was used for 3 different purposes:
1. symbol types from the lexer
2. symbol types on the parser stack
3. kind of control statement for 'if (expr)' and similar statements
Splitting the 41 constants into separate types makes it immediately
clear that the parser stack never handles comments, preprocessing lines,
newlines, form feeds, the inner structure of expressions.
Previously, the constant switch_expr was especially confusing since it
was used for 3 different purposes: when returned from lexi, it
represented the keyword 'switch', in the parser stack it represented
'switch (expr)', and it was used for a statement head as well.
The only overlap between the lexer symbols and the parser symbols are
'{' and '}', and the keywords 'do' and 'else'. To increase confusion,
the constants of the previous token_type were in apparently random
order and before 2021, they had cryptic, highly abbreviated names.
No functional change.
Revision 1.83: download - view: text, markup, annotated - select for diffs
Sun Oct 24 19:14:33 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +4 -4
lines
indent: run indent on its own source code
With manual corrections afterwards. Indent still does not get
extra_expr_indent correctly, it also indents global variables after
tagged declarations too deep.
No functional change.
Revision 1.82: download - view: text, markup, annotated - select for diffs
Sun Oct 24 11:17:05 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +3 -4
lines
indent: replace global variable use_ff with function parameter
Revision 1.81: download - view: text, markup, annotated - select for diffs
Sun Oct 24 11:08:46 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +5 -6
lines
indent: clean up comments
Revision 1.80: download - view: text, markup, annotated - select for diffs
Wed Oct 20 05:14:21 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +3 -3
lines
indent: rename blankline_requested variables
The words 'prefix' and 'postfix' sounded too much like horizontal
concepts, like in operators. The actual purpose of these variables is to
add blank lines before and after the current line, so use the same
wording as in the command line options.
No functional change.
Revision 1.79: download - view: text, markup, annotated - select for diffs
Thu Oct 14 20:23:43 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +4 -5
lines
indent: clarify that 25 is a magic number
The extra line width for comments to the very right is just that, an
arbitrarily chosen number. It neither has to be a multiple of 8, nor of
the tabsize nor of the indentation. Since 25 is neither of these, this
makes it a perfect choice, allowing these extreme comments to have 22
characters per line with -sc (leading asterisks in comment
continuations, the default) or 25 without.
No functional change.
Revision 1.78: download - view: text, markup, annotated - select for diffs
Thu Oct 14 20:15:18 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +14 -11
lines
indent: turn ps.com_ind into local variable
This makes it immediately clear that ps.com_ind is computed in the first
part of process_comment and then only used from there.
No functional change.
Revision 1.77: download - view: text, markup, annotated - select for diffs
Wed Oct 13 22:38:02 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +21 -17
lines
indent: extract fits_in_one_line from process_comment
No functional change.
Revision 1.76: download - view: text, markup, annotated - select for diffs
Tue Oct 12 22:22:35 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +5 -4
lines
indent: in process_comment, migrate int variable to bool
No functional change.
Revision 1.75: download - view: text, markup, annotated - select for diffs
Tue Oct 12 22:20:22 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +16 -20
lines
indent: in process_comment, negate box_com to may_wrap
In the new line 213, may_wrap could only be true and was therefore a
redundant condition.
No functional change.
Revision 1.74: download - view: text, markup, annotated - select for diffs
Tue Oct 12 22:04:03 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +8 -5
lines
indent: negate a few condition in process_comment
No functional change.
Revision 1.73: download - view: text, markup, annotated - select for diffs
Tue Oct 12 21:08:37 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +4 -3
lines
indent: fix formatting of single-line comments (since today)
The change in pr_comment.c 1.70 from 3 hours ago did not cover all edge
cases correctly. Now it works for comments that are aligned with tabs.
Revision 1.72: download - view: text, markup, annotated - select for diffs
Tue Oct 12 19:57:53 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +3 -4
lines
indent: replace unreachable code with assertion
Revision 1.71: download - view: text, markup, annotated - select for diffs
Tue Oct 12 19:56:07 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +57 -40
lines
indent: use high-level buffer API for processing comments
Document the trickery of copying the last word from the previous line
since that it not obvious at all.
No functional change.
Revision 1.70: download - view: text, markup, annotated - select for diffs
Tue Oct 12 18:22:01 2021 UTC (3 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +10 -15
lines
indent: fix wrapping for comments in otherwise empty lines
The comment above the code was wrong. The leading 3 characters were
indeed ignored, but the first of them was '/', not ' '. Of the trailing
3 characters, 2 were not ignored. The start and end of the comment would
not cancel out, they would rather sum up.
Revision 1.69: download - view: text, markup, annotated - select for diffs
Sat Oct 9 11:00:27 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +3 -3
lines
indent: extract common code for advancing a single tab
No functional change.
Revision 1.68: download - view: text, markup, annotated - select for diffs
Fri Oct 8 22:37:33 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +6 -5
lines
indent: replace unreachable code with assertions
The input buffer is always supposed to be terminated with a newline. The
function inbuf_read_line silently skips null characters. Since the input
buffer is redirected to a temporary buffer in some cases, do not simply
remove this supposed dead code, but replace it with assertions.
In any case, if the code for calling inbuf_read_line had been reachable
and actually allocated a different buffer, continuing to use the pointer
p would have invoked undefined behavior anyway.
Revision 1.67: download - view: text, markup, annotated - select for diffs
Fri Oct 8 22:27:52 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +3 -3
lines
indent: use standard error handling for unterminated comment
Just writing it to stdout is bad, especially when indent is used in
filter mode. Silently continuing after such an error is bad as well.
echo '/*' | indent
Revision 1.66: download - view: text, markup, annotated - select for diffs
Fri Oct 8 22:22:14 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +5 -5
lines
indent: remove redundant conditions
No functional change.
Revision 1.65: download - view: text, markup, annotated - select for diffs
Fri Oct 8 22:17:35 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +18 -24
lines
indent: convert ps.box_com to local variable
This variable is only used in a single function, and that function does
not call any other function that could replace the parser state or
install a temporary parser state.
No functional change.
Revision 1.64: download - view: text, markup, annotated - select for diffs
Fri Oct 8 21:13:58 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +3 -3
lines
indent: rename fill_buffer to inbuf_read_line
No functional change.
Revision 1.63: download - view: text, markup, annotated - select for diffs
Fri Oct 8 19:03:34 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +3 -3
lines
indent: run indent on indent.h
The formatting looks mostly OK.
Some struct members had excessively long names, leaving no space for
their corresponding comments. Renamed some of them using well-known
abbreviations.
The formatting for debug_vis_range is messed up, no idea why. It is
clearly a function declaration, not a function definition, so there is
no need to place the function name in column 1.
No functional change.
Revision 1.62: download - view: text, markup, annotated - select for diffs
Fri Oct 8 18:29:36 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +6 -7
lines
indent: fix formatting of C99 comments
The first attempt at formatting C99 comments was conceptually wrong. It
accessed the next token in dump_line, even though that function should
only ever look at the buffers for the label, the code and the current
comment. (Understanding that part of the code was difficult at that time
due to the sheer number of global variables.) The complicated and
ever-growing condition for whether to output the token was a hack and in
retrospect doesn't make sense at all, that's why it only came close to
the intended effect.
Some unintended side effects were that the C99 comments had an
additional space in front of them, and that in some cases an empty line
followed the comment, and that the comments were not aligned.
Previously, the newline that terminates the C99 comment was included in
the comment. Separating the newline from the comment fixed all these
unintended side effects. The only downside is that the multi-line
statement is not indented, but that should be easy to fix.
Revision 1.61: download - view: text, markup, annotated - select for diffs
Fri Oct 8 17:26:56 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +14 -15
lines
indent: reduce scope of t_ptr in process_comment
No functional change.
Revision 1.60: download - view: text, markup, annotated - select for diffs
Fri Oct 8 17:19:49 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +15 -15
lines
indent: replace column calculations with indent, part 4/4
Revision 1.59: download - view: text, markup, annotated - select for diffs
Fri Oct 8 17:12:08 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +8 -8
lines
indent: replace column calculations with indent, part 3
No functional change.
Revision 1.58: download - view: text, markup, annotated - select for diffs
Thu Oct 7 23:15:15 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +23 -23
lines
indent: group variables for the input buffer
The input buffer follows the same concept as the intermediate buffers
for label, code, comment and token, so use the same type for it.
No functional change.
Revision 1.57: download - view: text, markup, annotated - select for diffs
Thu Oct 7 21:57:21 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +4 -3
lines
indent: use braces around multi-line statements
No functional change.
Revision 1.56: download - view: text, markup, annotated - select for diffs
Thu Oct 7 21:52:54 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +22 -2
lines
indent: let the code breathe a bit by inserting empty lines
No functional change.
Revision 1.55: download - view: text, markup, annotated - select for diffs
Thu Oct 7 21:43:20 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +4 -8
lines
indent: clean up comments
No functional change.
Revision 1.54: download - view: text, markup, annotated - select for diffs
Thu Oct 7 21:38:25 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +5 -6
lines
indent: remove redundant comments
No functional change.
Revision 1.53: download - view: text, markup, annotated - select for diffs
Tue Oct 5 19:58:38 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +5 -5
lines
indent: fix outdated comment, add 'const'
Revision 1.52: download - view: text, markup, annotated - select for diffs
Tue Oct 5 06:49:19 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +7 -8
lines
indent: fix spelling in comments
Revision 1.51: download - view: text, markup, annotated - select for diffs
Tue Oct 5 06:15:24 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +4 -4
lines
indent: use proper escape sequence for form feed
This escape sequence has been available since at least 1978.
Revision 1.50: download - view: text, markup, annotated - select for diffs
Tue Oct 5 06:09:42 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +12 -11
lines
indent: merge duplicate code into is_hspace
No functional change.
Revision 1.49: download - view: text, markup, annotated - select for diffs
Tue Oct 5 05:56:49 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +7 -8
lines
indent: clean up code for appending to buffers
Use *e++ for appending and e[-1] for testing the previously appended
character, like in other places in the code.
No functional change.
Revision 1.48: download - view: text, markup, annotated - select for diffs
Tue Oct 5 05:39:14 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +10 -17
lines
indent: merge duplicate code for reading from input buffer
No functional change.
Revision 1.47: download - view: text, markup, annotated - select for diffs
Sun Sep 26 19:37:11 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +25 -24
lines
indent: let indent format its own code -- in supervised mode
After running indent on the code, I manually selected each change that
now looks better than before. The remaining changes are left for later.
All in all, indent did a pretty good job, except for syntactic additions
from after 1990, but that was to be expected. Examples for such
additions are GCC's __attribute__ and C99 designated initializers.
Indent has only few knobs to tune the indentation. The knob for the
continuation indentation applies to function declarations as well as to
expressions. The knob for indentation of local variable declarations
applies to struct members as well, even if these are members of a
top-level struct.
Several code comments crossed the right margin in column 78. Several
other code comments were correctly broken though. The cause for this
difference was not obvious.
No functional change.
Revision 1.46: download - view: text, markup, annotated - select for diffs
Sat Sep 25 22:14:21 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +4 -13
lines
indent: merge duplicate code for token buffers
No functional change.
Revision 1.45: download - view: text, markup, annotated - select for diffs
Sat Sep 25 20:23:42 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +3 -8
lines
indent: remove dead code for printing comments after empty lines
This code has been commented out for at least 29 years.
No functional change.
Revision 1.44: download - view: text, markup, annotated - select for diffs
Sat Sep 25 17:36:51 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +3 -3
lines
indent: convert remaining ibool to bool
No functional change intended.
Revision 1.43: download - view: text, markup, annotated - select for diffs
Sat Sep 25 17:11:23 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +7 -7
lines
indent: prepare for lint's strict bool mode
Before C99, C had no boolean type. Instead, indent used int for that,
just like many other programs. Even with C99, bool and int can be used
interchangeably in many situations, such as querying '!i' or '!ptr' or
'cond == 0'.
Since January 2021, lint provides the strict bool mode, which makes bool
a non-arithmetic type that is incompatible with any other type. Having
clearly separate types helps in understanding the code.
To migrate indent to strict bool mode, the first step is to apply all
changes that keep the resulting binary the same. Since sizeof(bool) is
1 and sizeof(int) is 4, the type ibool serves as an intermediate type.
For now it is defined to int, later it will become bool.
The current code compiles cleanly in C99 and C11 mode, as well as in
lint's strict bool mode. There are a few tricky places:
In args.c in 'struct pro', there are two types of options: boolean and
integer. Boolean options point to a bool variable, integer options
point to an int variable. To keep the current structure of the code,
the pointer has been changed to 'void *'. To ensure type safety, the
definition of the options is done via preprocessor magic, which in C11
mode ensures the correct pointer types. (Add CFLAGS+=-std=gnu11 at the
very bottom of the Makefile.)
In indent.c in process_preprocessing, a boolean variable is
post-incremented. That variable is only assigned to another variable,
and that variable is only used in a boolean context. To provoke a
different behavior between the '++' and the '= true', the source code
to be indented would need 1 << 32 preprocessing directives, which is
unlikely to happen in practice.
In io.c in dump_line, the variables ps.in_stmt and ps.in_decl only ever
get the values 0 and 1. For these values, the expressions 'a & ~b' and
'a && !b' are equivalent, in all versions of C. The compiler may
generate different code for them, though.
In io.c in parse_indent_comment, the assignment to inhibit_formatting
takes place in integer context. If the compiler is smart enough to
detect the possible values of on_off, it may generate the same code
before and after the change, but that is rather unlikely.
The second step of the migration will be to replace ibool with bool,
step by step, just in case there are any hidden gotchas in the code,
such as sizeof or pointer casts.
No change to the resulting binary.
Revision 1.42: download - view: text, markup, annotated - select for diffs
Sat Sep 25 13:38:32 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +2 -6
lines
indent: remove ifdef for lint
NetBSD lint does not need them anymore, FreeBSD does not have lint.
Revision 1.41: download - view: text, markup, annotated - select for diffs
Sat Sep 25 10:41:03 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +3 -3
lines
indent: move statistical values into a separate struct
No functional change.
Revision 1.40: download - view: text, markup, annotated - select for diffs
Sat Sep 25 08:23:31 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +3 -5
lines
indent: add nonnull memory allocation functions
The only functional change is a single error message.
Revision 1.39: download - view: text, markup, annotated - select for diffs
Sat Sep 25 08:04:13 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +6 -6
lines
indent: group global variables for token buffer
No functional change.
Revision 1.38: download - view: text, markup, annotated - select for diffs
Sat Sep 25 07:55:24 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +5 -5
lines
indent: group global variables for code buffer
No functional change.
Revision 1.37: download - view: text, markup, annotated - select for diffs
Fri Sep 24 18:47:29 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +5 -5
lines
indent: group global variables for label buffer into struct
No functional change.
Revision 1.36: download - view: text, markup, annotated - select for diffs
Fri Sep 24 18:14:06 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +53 -53
lines
indent: group global variables for the comment buffer
No functional change.
Revision 1.35: download - view: text, markup, annotated - select for diffs
Sun Mar 14 05:26:42 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
CVS tags: cjep_sun2x-base1,
cjep_sun2x-base,
cjep_sun2x,
cjep_staticlib_x-base1,
cjep_staticlib_x-base,
cjep_staticlib_x
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +24 -35
lines
indent: clean up check_size_comment
The additional parameter last_bl_ptr was only necessary because the last
blank was stored as a pointer into the buffer. By storing the index in
the buffer instead, it doesn't need to be updated all the time.
No functional change.
Revision 1.34: download - view: text, markup, annotated - select for diffs
Sun Mar 14 04:52:10 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +5 -5
lines
indent: remove trailing whitespace
Revision 1.33: download - view: text, markup, annotated - select for diffs
Sun Mar 14 04:42:17 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +8 -7
lines
indent: clean up target column computation in process_comment
No functional change.
Revision 1.32: download - view: text, markup, annotated - select for diffs
Sun Mar 14 01:34:13 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +8 -3
lines
indent: fix off-by-one error in comment wrapping
The manual page says that the default maximum length of a comment line
is 78. The test 'comments.0' wrongly assumed that this 78 would refer
to the maximum _column_ allowed, which is off by one.
Fix the wording in the test 'comments.0' and remove the (now satisfied)
expectation comments in the test 'token-comment.0'.
Several other tests just happened to hit that limit, fix these as well.
Revision 1.31: download - view: text, markup, annotated - select for diffs
Sun Mar 14 00:22:16 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +3 -3
lines
indent: fix lint warnings
No functional change.
Revision 1.30: download - view: text, markup, annotated - select for diffs
Sat Mar 13 18:11:31 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +5 -4
lines
indent: remove the '+ 1' from right margin calculation in comment
No functional change.
Revision 1.29: download - view: text, markup, annotated - select for diffs
Sat Mar 13 13:51:08 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +6 -5
lines
indent: distinguish between 'column' and 'indentation'
column == 1 + indentation.
In addition, indentation is a relative distance while column is an
absolute position. Therefore, don't confuse these two concepts, to
prevent off-by-one errors.
No functional change.
Revision 1.28: download - view: text, markup, annotated - select for diffs
Sat Mar 13 13:25:23 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +14 -27
lines
indent: rename pr_comment to process_comment, clean up documentation
No functional change.
Revision 1.27: download - view: text, markup, annotated - select for diffs
Sat Mar 13 11:27:01 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +3 -3
lines
indent: remove redundant parentheses
No functional change.
Revision 1.26: download - view: text, markup, annotated - select for diffs
Sat Mar 13 11:19:43 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +18 -14
lines
indent: fix confusing variable names
The word 'col' should only be used for the 1-based column number. This
name is completely inappropriate for a line length since that provokes
off-by-one errors. The name 'cols' would be acceptable although
confusing since it sounds so similar to 'col'.
Therefore, rename variables that are related to the maximum line length
to 'line_length' since that makes for obvious code and nicely relates to
the description of the option in the manual page.
No functional change.
Revision 1.25: download - view: text, markup, annotated - select for diffs
Sat Mar 13 10:47:59 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +6 -2
lines
indent: document undefined behavior in processing of comments
No functional change.
Revision 1.24: download - view: text, markup, annotated - select for diffs
Sat Mar 13 10:32:25 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +7 -7
lines
indent: inline calls to count_spaces and count_spaces_until
These two functions operated on column numbers instead of indentation,
which required adjustments of '+ 1' and '- 1'. Their names were
completely wrong since these functions did not count anything, instead
they computed the column.
No functional change.
Revision 1.23: download - view: text, markup, annotated - select for diffs
Sat Mar 13 10:06:47 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +4 -4
lines
indent: replace compute_code_column with compute_code_indent
The goal is to only ever be concerned about the _indentation_ of a
token, never the _column_ it appears in. Having only one of these
avoids off-by-one errors.
No functional change.
Revision 1.22: download - view: text, markup, annotated - select for diffs
Sat Mar 13 09:54:11 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +3 -3
lines
indent: replace compute_label_column with compute_label_indent
Using the invariant 'column == 1 + indent'. This removes several overly
complicated '+ 1' from the code that are not needed conceptually.
No functional change.
Revision 1.21: download - view: text, markup, annotated - select for diffs
Sat Mar 13 00:26:56 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +4 -4
lines
indent: replace pad_output with output_indent
Calculating the indentation is simpler than calculating the column,
since that saves the constant addition and subtraction of the 1.
No functional change.
Revision 1.20: download - view: text, markup, annotated - select for diffs
Fri Mar 12 23:16:00 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +4 -4
lines
indent: replace 'target' with 'indent' in function names
The word 'target' was not as specific as possible.
No functional change.
Revision 1.19: download - view: text, markup, annotated - select for diffs
Fri Mar 12 23:10:18 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +10 -18
lines
indent: use consistent indentation for 'else'
Half of the code used -ce, the other half the opposite -nce.
No functional change.
Revision 1.18: download - view: text, markup, annotated - select for diffs
Thu Mar 11 22:32:06 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +16 -19
lines
indent: reduce indentation of check_size functions
No functional change.
Revision 1.17: download - view: text, markup, annotated - select for diffs
Thu Mar 11 22:28:30 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +3 -3
lines
indent: remove redundant cast after allocation functions
No functional change.
Revision 1.16: download - view: text, markup, annotated - select for diffs
Thu Mar 11 22:15:44 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +3 -3
lines
indent: use consistent array indexing
No functional change.
Revision 1.15: download - view: text, markup, annotated - select for diffs
Tue Mar 9 16:48:28 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +4 -4
lines
indent: manually indent comments
It's strange that indent's own code is not formatted by indent itself,
which would be a good demonstration of its capabilities.
In its current state, I don't trust indent to get even the tokenization
correct, therefore the only safe way is to format the code manually.
Revision 1.14: download - view: text, markup, annotated - select for diffs
Mon Mar 8 20:15:42 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +29 -7
lines
indent: convert big macros to functions
Each of these buffers is only modified in a single file. This makes it
unnecessary to declare the macros in the global header.
Revision 1.13: download - view: text, markup, annotated - select for diffs
Sun Mar 7 22:11:01 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +13 -6
lines
indent: fix handling of '//' end-of-line comments
Revision 1.12: download - view: text, markup, annotated - select for diffs
Sun Mar 7 10:42:48 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +4 -4
lines
indent: use all headers in all files
This is a prerequisite for converting the token types to an enum instead
of a preprocessor define, since the return type of lexi will become
token_type. Having the enum will make debugging easier.
There was a single naming collision, which forced the variable in
scan_profile to be renamed. All other token names are used nowhere
else.
No change to the resulting binary.
Revision 1.10.16.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:10:20 2019 UTC (5 years, 6 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.10: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10: +276 -374
lines
Sync with HEAD
Revision 1.1.1.2 (vendor branch): download - view: text, markup, annotated - select for diffs
Thu Apr 4 20:39:17 2019 UTC (5 years, 8 months ago) by kamil
Branches: FREEBSD,
CSRG
CVS tags: r340138
Diff to: previous 1.1.1.1: preferred, colored
Changes since revision 1.1.1.1: +134 -197
lines
FreeBSD indent r340138
Revision 1.11: download - view: text, markup, annotated - select for diffs
Thu Apr 4 15:22:13 2019 UTC (5 years, 8 months ago) by kamil
Branches: MAIN
CVS tags: phil-wifi-20200421,
phil-wifi-20200411,
phil-wifi-20200406,
phil-wifi-20191119,
phil-wifi-20190609,
netbsd-9-base,
netbsd-9-4-RELEASE,
netbsd-9-3-RELEASE,
netbsd-9-2-RELEASE,
netbsd-9-1-RELEASE,
netbsd-9-0-RELEASE,
netbsd-9-0-RC2,
netbsd-9-0-RC1,
netbsd-9,
is-mlppp-base,
is-mlppp
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +276 -374
lines
Upgrade indent(1)
Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.
FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.
Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.
Major chages in this import:
- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.
Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.
Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.
Revision 1.10: download - view: text, markup, annotated - select for diffs
Thu Feb 25 13:23:27 2016 UTC (8 years, 9 months ago) by ginsbach
Branches: MAIN
CVS tags: prg-localcount2-base3,
prg-localcount2-base2,
prg-localcount2-base1,
prg-localcount2-base,
prg-localcount2,
phil-wifi-base,
pgoyette-localcount-base,
pgoyette-localcount-20170426,
pgoyette-localcount-20170320,
pgoyette-localcount-20170107,
pgoyette-localcount-20161104,
pgoyette-localcount-20160806,
pgoyette-localcount-20160726,
pgoyette-localcount,
pgoyette-compat-merge-20190127,
pgoyette-compat-base,
pgoyette-compat-20190127,
pgoyette-compat-20190118,
pgoyette-compat-1226,
pgoyette-compat-1126,
pgoyette-compat-1020,
pgoyette-compat-0930,
pgoyette-compat-0906,
pgoyette-compat-0728,
pgoyette-compat-0625,
pgoyette-compat-0521,
pgoyette-compat-0502,
pgoyette-compat-0422,
pgoyette-compat-0415,
pgoyette-compat-0407,
pgoyette-compat-0330,
pgoyette-compat-0322,
pgoyette-compat-0315,
pgoyette-compat,
perseant-stdc-iso10646-base,
perseant-stdc-iso10646,
netbsd-8-base,
netbsd-8-3-RELEASE,
netbsd-8-2-RELEASE,
netbsd-8-1-RELEASE,
netbsd-8-1-RC1,
netbsd-8-0-RELEASE,
netbsd-8-0-RC2,
netbsd-8-0-RC1,
netbsd-8,
matt-nb8-mediatek-base,
matt-nb8-mediatek,
localcount-20160914,
bouyer-socketcan-base1,
bouyer-socketcan-base,
bouyer-socketcan
Branch point for: phil-wifi
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +6 -6
lines
Fix obvious contraction spelling mistakes by adding missing apostrophes.
Revision 1.9: download - view: text, markup, annotated - select for diffs
Thu Aug 7 11:14:09 2003 UTC (21 years, 4 months ago) by agc
Branches: MAIN
CVS tags: yamt-pf42-baseX,
yamt-pf42-base4,
yamt-pf42-base3,
yamt-pf42-base2,
yamt-pf42-base,
yamt-pf42,
yamt-pagecache-tag8,
yamt-pagecache-base9,
yamt-pagecache-base8,
yamt-pagecache-base7,
yamt-pagecache-base6,
yamt-pagecache-base5,
yamt-pagecache-base4,
yamt-pagecache-base3,
yamt-pagecache-base2,
yamt-pagecache-base,
yamt-pagecache,
wrstuden-revivesa-base-3,
wrstuden-revivesa-base-2,
wrstuden-revivesa-base-1,
wrstuden-revivesa-base,
wrstuden-revivesa,
wrstuden-fixsa-newbase,
wrstuden-fixsa-base-1,
wrstuden-fixsa-base,
wrstuden-fixsa,
tls-maxphys-base,
tls-maxphys,
tls-earlyentropy-base,
tls-earlyentropy,
riastradh-xf86-video-intel-2-7-1-pre-2-21-15,
riastradh-drm2-base3,
riastradh-drm2-base2,
riastradh-drm2-base1,
riastradh-drm2-base,
riastradh-drm2,
netbsd-7-nhusb-base-20170116,
netbsd-7-nhusb-base,
netbsd-7-nhusb,
netbsd-7-base,
netbsd-7-2-RELEASE,
netbsd-7-1-RELEASE,
netbsd-7-1-RC2,
netbsd-7-1-RC1,
netbsd-7-1-2-RELEASE,
netbsd-7-1-1-RELEASE,
netbsd-7-1,
netbsd-7-0-RELEASE,
netbsd-7-0-RC3,
netbsd-7-0-RC2,
netbsd-7-0-RC1,
netbsd-7-0-2-RELEASE,
netbsd-7-0-1-RELEASE,
netbsd-7-0,
netbsd-7,
netbsd-6-base,
netbsd-6-1-RELEASE,
netbsd-6-1-RC4,
netbsd-6-1-RC3,
netbsd-6-1-RC2,
netbsd-6-1-RC1,
netbsd-6-1-5-RELEASE,
netbsd-6-1-4-RELEASE,
netbsd-6-1-3-RELEASE,
netbsd-6-1-2-RELEASE,
netbsd-6-1-1-RELEASE,
netbsd-6-1,
netbsd-6-0-RELEASE,
netbsd-6-0-RC2,
netbsd-6-0-RC1,
netbsd-6-0-6-RELEASE,
netbsd-6-0-5-RELEASE,
netbsd-6-0-4-RELEASE,
netbsd-6-0-3-RELEASE,
netbsd-6-0-2-RELEASE,
netbsd-6-0-1-RELEASE,
netbsd-6-0,
netbsd-6,
netbsd-5-base,
netbsd-5-2-RELEASE,
netbsd-5-2-RC1,
netbsd-5-2-3-RELEASE,
netbsd-5-2-2-RELEASE,
netbsd-5-2-1-RELEASE,
netbsd-5-2,
netbsd-5-1-RELEASE,
netbsd-5-1-RC4,
netbsd-5-1-RC3,
netbsd-5-1-RC2,
netbsd-5-1-RC1,
netbsd-5-1-5-RELEASE,
netbsd-5-1-4-RELEASE,
netbsd-5-1-3-RELEASE,
netbsd-5-1-2-RELEASE,
netbsd-5-1-1-RELEASE,
netbsd-5-1,
netbsd-5-0-RELEASE,
netbsd-5-0-RC4,
netbsd-5-0-RC3,
netbsd-5-0-RC2,
netbsd-5-0-RC1,
netbsd-5-0-2-RELEASE,
netbsd-5-0-1-RELEASE,
netbsd-5-0,
netbsd-5,
netbsd-4-base,
netbsd-4-0-RELEASE,
netbsd-4-0-RC5,
netbsd-4-0-RC4,
netbsd-4-0-RC3,
netbsd-4-0-RC2,
netbsd-4-0-RC1,
netbsd-4-0-1-RELEASE,
netbsd-4-0,
netbsd-4,
netbsd-3-base,
netbsd-3-1-RELEASE,
netbsd-3-1-RC4,
netbsd-3-1-RC3,
netbsd-3-1-RC2,
netbsd-3-1-RC1,
netbsd-3-1-1-RELEASE,
netbsd-3-1,
netbsd-3-0-RELEASE,
netbsd-3-0-RC6,
netbsd-3-0-RC5,
netbsd-3-0-RC4,
netbsd-3-0-RC3,
netbsd-3-0-RC2,
netbsd-3-0-RC1,
netbsd-3-0-3-RELEASE,
netbsd-3-0-2-RELEASE,
netbsd-3-0-1-RELEASE,
netbsd-3-0,
netbsd-3,
netbsd-2-base,
netbsd-2-1-RELEASE,
netbsd-2-1-RC6,
netbsd-2-1-RC5,
netbsd-2-1-RC4,
netbsd-2-1-RC3,
netbsd-2-1-RC2,
netbsd-2-1-RC1,
netbsd-2-1,
netbsd-2-0-base,
netbsd-2-0-RELEASE,
netbsd-2-0-RC5,
netbsd-2-0-RC4,
netbsd-2-0-RC3,
netbsd-2-0-RC2,
netbsd-2-0-RC1,
netbsd-2-0-3-RELEASE,
netbsd-2-0-2-RELEASE,
netbsd-2-0-1-RELEASE,
netbsd-2-0,
netbsd-2,
mjf-devfs2-base,
mjf-devfs2,
matt-premerge-20091211,
matt-nb6-plus-nbase,
matt-nb6-plus-base,
matt-nb6-plus,
matt-nb5-pq3-base,
matt-nb5-pq3,
matt-nb5-mips64-u2-k2-k4-k7-k8-k9,
matt-nb5-mips64-u1-k1-k5,
matt-nb5-mips64-premerge-20101231,
matt-nb5-mips64-premerge-20091211,
matt-nb5-mips64-k15,
matt-nb5-mips64,
matt-nb4-mips64-k7-u2a-k9b,
matt-mips64-premerge-20101231,
matt-mips64-base2,
matt-mips64-base,
matt-mips64,
matt-armv6-prevmlocking,
matt-armv6-nbase,
matt-armv6-base,
matt-armv6,
keiichi-mipv6-nbase,
keiichi-mipv6-base,
keiichi-mipv6,
jym-xensuspend-nbase,
jym-xensuspend-base,
jym-xensuspend,
hpcarm-cleanup-nbase,
hpcarm-cleanup-base,
hpcarm-cleanup,
cube-autoconf-base,
cube-autoconf,
cherry-xenmp-base,
cherry-xenmp,
chap-midi-nbase,
chap-midi-base,
chap-midi,
bouyer-quota2-nbase,
bouyer-quota2-base,
bouyer-quota2,
agc-symver-base,
agc-symver,
abandoned-netbsd-4-base,
abandoned-netbsd-4
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +29 -2
lines
Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
Revision 1.8: download - view: text, markup, annotated - select for diffs
Thu Jun 19 15:45:22 2003 UTC (21 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +8 -5
lines
PR/21645: Mishka: Localized comments don't work with indent.
Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun May 26 22:53:38 2002 UTC (22 years, 6 months ago) by wiz
Branches: MAIN
CVS tags: fvdl_fs64_base
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +3 -3
lines
Remove #ifndef'd __STDC__ code. ANSIfy.
Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Oct 19 03:17:29 1997 UTC (27 years, 1 month ago) by lukem
Branches: MAIN
CVS tags: wrstuden-devbsize-base,
wrstuden-devbsize-19991221,
wrstuden-devbsize,
netbsd-1-6-base,
netbsd-1-6-RELEASE,
netbsd-1-6-RC3,
netbsd-1-6-RC2,
netbsd-1-6-RC1,
netbsd-1-6-PATCH002-RELEASE,
netbsd-1-6-PATCH002-RC4,
netbsd-1-6-PATCH002-RC3,
netbsd-1-6-PATCH002-RC2,
netbsd-1-6-PATCH002-RC1,
netbsd-1-6-PATCH002,
netbsd-1-6-PATCH001-RELEASE,
netbsd-1-6-PATCH001-RC3,
netbsd-1-6-PATCH001-RC2,
netbsd-1-6-PATCH001-RC1,
netbsd-1-6-PATCH001,
netbsd-1-6,
netbsd-1-5-base,
netbsd-1-5-RELEASE,
netbsd-1-5-PATCH003,
netbsd-1-5-PATCH002,
netbsd-1-5-PATCH001,
netbsd-1-5-BETA2,
netbsd-1-5-BETA,
netbsd-1-5-ALPHA2,
netbsd-1-5,
netbsd-1-4-base,
netbsd-1-4-RELEASE,
netbsd-1-4-PATCH003,
netbsd-1-4-PATCH002,
netbsd-1-4-PATCH001,
netbsd-1-4,
netbsd-1-3-base,
netbsd-1-3-RELEASE,
netbsd-1-3-PATCH003-CANDIDATE2,
netbsd-1-3-PATCH003-CANDIDATE1,
netbsd-1-3-PATCH003-CANDIDATE0,
netbsd-1-3-PATCH003,
netbsd-1-3-PATCH002,
netbsd-1-3-PATCH001,
netbsd-1-3-BETA,
netbsd-1-3,
minoura-xpg4dl-base,
minoura-xpg4dl,
comdex-fall-1999-base,
comdex-fall-1999
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +331 -325
lines
WARNSify, fix .Nm usage, deprecate register, use <err.h>, KNFify (with indent!;)
Revision 1.5: download - view: text, markup, annotated - select for diffs
Sat Oct 18 16:04:56 1997 UTC (27 years, 1 month ago) by mrg
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +9 -5
lines
merge lite-2.
Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu Jan 9 20:20:19 1997 UTC (27 years, 11 months ago) by tls
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +3 -1
lines
RCS ID police
Revision 1.3: download - view: text, markup, annotated - select for diffs
Sat Aug 7 06:56:51 1993 UTC (31 years, 4 months ago) by cgd
Branches: MAIN
CVS tags: netbsd-1-2-base,
netbsd-1-2-RELEASE,
netbsd-1-2-PATCH001,
netbsd-1-2-BETA,
netbsd-1-2,
netbsd-1-1-base,
netbsd-1-1-RELEASE,
netbsd-1-1-PATCH001,
netbsd-1-1,
netbsd-1-0-base,
netbsd-1-0-RELEASE,
netbsd-1-0-PATCH1,
netbsd-1-0-PATCH06,
netbsd-1-0-PATCH05,
netbsd-1-0-PATCH04,
netbsd-1-0-PATCH03,
netbsd-1-0-PATCH02,
netbsd-1-0-PATCH0,
netbsd-1-0
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +5 -5
lines
do block commenting, if comment begins with slash-star-newline.
Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Aug 1 18:14:28 1993 UTC (31 years, 4 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +2 -1
lines
Add RCS identifiers.
Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Sun Jun 6 21:52:46 1993 UTC (31 years, 6 months ago) by mrg
Branches: FREEBSD,
CSRG
CVS tags: lite-2
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -3
lines
4.4BSD-Lite2
Revision 1.1: download - view: text, markup, annotated - select for diffs
Fri Apr 9 12:59:18 1993 UTC (31 years, 8 months ago) by cgd
Branches: MAIN
CVS tags: netbsd-alpha-1,
netbsd-0-9-base,
netbsd-0-9-RELEASE,
netbsd-0-9-BETA,
netbsd-0-9-ALPHA2,
netbsd-0-9-ALPHA,
netbsd-0-9,
netbsd-0-8
added, from net/2 (patch 124).
CVSweb <webmaster@jp.NetBSD.org>