Up to [cvs.NetBSD.org] / src / usr.bin / indent
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.245 / (download) - annotate - [select for diffs], Mon May 9 21:41:49 2022 UTC (8 months, 3 weeks ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base,
netbsd-10,
HEAD
Changes since 1.244: +2 -5
lines
Diff to previous 1.244 (colored)
indent: clean up control flow, remove Capsicum No functional change.
Revision 1.244 / (download) - annotate - [select for diffs], Sat Apr 23 06:43:22 2022 UTC (9 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.243: +13 -15
lines
Diff to previous 1.243 (colored)
indent: group global variables related to output control No functional change.
Revision 1.243 / (download) - annotate - [select for diffs], Sat Apr 23 06:32:20 2022 UTC (9 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.242: +2 -23
lines
Diff to previous 1.242 (colored)
indent: remove Capsicum support NetBSD doesn't have Capsicum.
Revision 1.242 / (download) - annotate - [select for diffs], Sun Feb 13 12:43:26 2022 UTC (11 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.241: +32 -32
lines
Diff to previous 1.241 (colored)
indent: rename parser_state.p_l_follow and paren_level The previous variable names were misleading. Paren_level is not the current level of parentheses but the one from the beginning of the current output line. For better accuracy, rename it to line_start_paren_level. P_l_follow is not the level of parentheses that will be active at some point in the future, as the previous name suggested. Instead, it is the level of parentheses right now. For better accuracy, rename it to nparen. This nicely matches its main usage, which is as index to the parser_state.paren array. No binary change.
Revision 1.241 / (download) - annotate - [select for diffs], Sun Feb 13 12:20:09 2022 UTC (11 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.240: +14 -15
lines
Diff to previous 1.240 (colored)
indent: replace bitmasking code with struct The struct directly represents the properties of a pair of parentheses, without forcing the human reader to decode any bitset. This makes it easier to find the remaining bugs in the heuristic for determining the kind of parentheses. No functional change outside debug mode.
Revision 1.240 / (download) - annotate - [select for diffs], Sun Feb 13 12:09:19 2022 UTC (11 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.239: +8 -8
lines
Diff to previous 1.239 (colored)
indent: change parser_state.cast_mask to 0-based indexing Having 1-based indexing was completely unexpected, and it didn't match the 0-based indexing of parser_state.paren_indents. No functional change.
Revision 1.239 / (download) - annotate - [select for diffs], Sun Nov 28 14:29:03 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.238: +2 -13
lines
Diff to previous 1.238 (colored)
indent: treat L"string" as a single token There is never whitespace between the 'L' and the string literal or the character constant. There might be a backslash-newline between them, but that case was not handled before either. No functional change.
Revision 1.238 / (download) - annotate - [select for diffs], Sun Nov 28 11:49:10 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.237: +3 -3
lines
Diff to previous 1.237 (colored)
indent: clean up and document input handling The transformation of moving comments from after an 'if (expr)' after the following brace has a large implementation cost (about 300 lines of code) and makes input handling quite complicated. Document the overall idea to save future readers some time. No functional change.
Revision 1.237 / (download) - annotate - [select for diffs], Sat Nov 27 21:15:58 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.236: +4 -4
lines
Diff to previous 1.236 (colored)
indent: accept a few formatting suggestions from indent The remaining issues are still that the conditions look ambiguous even with -eei, and that __attribute__ is broken into a separate line. No functional change.
Revision 1.236 / (download) - annotate - [select for diffs], Sat Nov 27 18:37:17 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.235: +14 -14
lines
Diff to previous 1.235 (colored)
indent: rename dump functions to output No functional change.
Revision 1.235 / (download) - annotate - [select for diffs], Sat Nov 27 18:29:29 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.234: +9 -15
lines
Diff to previous 1.234 (colored)
indent: inline switch_buffer The function name was not accurate all the time. Now that inp_from_comment is a separate function, it doesn't make sense anymore to offload the 3 simple statements to a separate function. No functional change.
Revision 1.234 / (download) - annotate - [select for diffs], Fri Nov 26 15:18:18 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.233: +17 -11
lines
Diff to previous 1.233 (colored)
indent: add buf_add_range for adding characters to a buffer No functional change.
Revision 1.233 / (download) - annotate - [select for diffs], Fri Nov 26 14:17:01 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.232: +22 -2
lines
Diff to previous 1.232 (colored)
indent: move ind_add from io.c to indent.c It's a general-purpose function that is not directly related to input or output.
Revision 1.232 / (download) - annotate - [select for diffs], Thu Nov 25 18:48:37 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.231: +9 -9
lines
Diff to previous 1.231 (colored)
indent: rename ps.in_function_parameters to match reality This flag is only set while parsing the parameters of a function definition, but not for a function declaration. See buffer_add in the test fmt_decl. No functional change.
Revision 1.231 / (download) - annotate - [select for diffs], Thu Nov 25 07:45:32 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.230: +13 -12
lines
Diff to previous 1.230 (colored)
indent: rename ps.in_stmt to in_stmt_or_decl The previous name didn't match reality. No functional change.
Revision 1.230 / (download) - annotate - [select for diffs], Thu Nov 25 07:41:13 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.229: +5 -5
lines
Diff to previous 1.229 (colored)
indent: rename ps.ind_stmt to in_stmt_cont This makes a comment redundant. No functional change.
Revision 1.229 / (download) - annotate - [select for diffs], Thu Nov 25 07:30:54 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.228: +5 -4
lines
Diff to previous 1.228 (colored)
indent: clean up style No functional change.
Revision 1.228 / (download) - annotate - [select for diffs], Fri Nov 19 20:23:17 2021 UTC (14 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.227: +3 -4
lines
Diff to previous 1.227 (colored)
indent: reduce casts to unsigned char for character classification No functional change.
Revision 1.227 / (download) - annotate - [select for diffs], Fri Nov 19 20:04:02 2021 UTC (14 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.226: +3 -2
lines
Diff to previous 1.226 (colored)
indent: fix included headers
Revision 1.226 / (download) - annotate - [select for diffs], Fri Nov 19 19:55:15 2021 UTC (14 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.225: +5 -5
lines
Diff to previous 1.225 (colored)
indent: replace ps.procname with ps.is_function_definition Omly the first character of ps.procname was ever read, and it was only compared to '\0'. Using a bool for this means simpler code, less memory and fewer wasted CPU cycles due to the removed strncpy. No functional change.
Revision 1.225 / (download) - annotate - [select for diffs], Fri Nov 19 18:14:18 2021 UTC (14 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.224: +13 -35
lines
Diff to previous 1.224 (colored)
indent: remove all references to inbuf from indent.c No functional change.
Revision 1.224 / (download) - annotate - [select for diffs], Fri Nov 19 17:59:16 2021 UTC (14 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.223: +7 -36
lines
Diff to previous 1.223 (colored)
indent: move character input handling from indent.c to io.c No functional change.
Revision 1.223 / (download) - annotate - [select for diffs], Fri Nov 19 17:42:45 2021 UTC (14 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.222: +25 -82
lines
Diff to previous 1.222 (colored)
indent: move character input from indent.c to io.c No functional change.
Revision 1.222 / (download) - annotate - [select for diffs], Fri Nov 19 17:11:46 2021 UTC (14 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.221: +11 -11
lines
Diff to previous 1.221 (colored)
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.221 / (download) - annotate - [select for diffs], Fri Nov 19 15:34:25 2021 UTC (14 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.220: +23 -16
lines
Diff to previous 1.220 (colored)
indent: add debug logging for input buffer handling
Revision 1.220 / (download) - annotate - [select for diffs], Fri Nov 19 15:32:13 2021 UTC (14 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.219: +59 -58
lines
Diff to previous 1.219 (colored)
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.219 / (download) - annotate - [select for diffs], Fri Nov 19 15:28:32 2021 UTC (14 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.218: +61 -68
lines
Diff to previous 1.218 (colored)
indent: group variables for input handling No functional change.
Revision 1.218 / (download) - annotate - [select for diffs], Sun Nov 7 19:18:56 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.217: +10 -11
lines
Diff to previous 1.217 (colored)
indent: fix handling of C99 comments after 'if (expr)'
Revision 1.217 / (download) - annotate - [select for diffs], Sun Nov 7 18:49:02 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.216: +3 -2
lines
Diff to previous 1.216 (colored)
indent: demonstrate disappearing form feed
Revision 1.216 / (download) - annotate - [select for diffs], Sun Nov 7 18:26:17 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.215: +8 -8
lines
Diff to previous 1.215 (colored)
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.215 / (download) - annotate - [select for diffs], Sun Nov 7 15:18:25 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.214: +15 -15
lines
Diff to previous 1.214 (colored)
indent: rename ps.decl_nest to decl_level This better matches the comment. No functional change.
Revision 1.214 / (download) - annotate - [select for diffs], Sun Nov 7 14:00:35 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.213: +4 -4
lines
Diff to previous 1.213 (colored)
indent: reduce negations in process_else, clean up comments No functional change.
Revision 1.213 / (download) - annotate - [select for diffs], Sun Nov 7 13:30:15 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.212: +5 -5
lines
Diff to previous 1.212 (colored)
indent: only access buffer data in the range [buf.s, buf.e) No functional change.
Revision 1.212 / (download) - annotate - [select for diffs], Sun Nov 7 07:44:59 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.211: +3 -3
lines
Diff to previous 1.211 (colored)
indent: rename type_at_paren_level_0 to type_outside_parentheses For symmetry with type_in_parentheses. No functional change.
Revision 1.211 / (download) - annotate - [select for diffs], Sun Nov 7 07:35:06 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.210: +6 -5
lines
Diff to previous 1.210 (colored)
indent: distinguish between typename in parentheses and other words This gets rid of two members of parser_state. No functional change for well-formed programs. The sequence of '++int' or '--size_t' may be formatted differently than before, but no program is expected to contain that sequence. Rename lsym_ident to lsym_word since 'ident' was too specific. This token type is used for constants and string literals as well. Strictly speaking, a string literal is not a word, but at least it's better than before.
Revision 1.210 / (download) - annotate - [select for diffs], Sun Nov 7 07:06:00 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.209: +10 -10
lines
Diff to previous 1.209 (colored)
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.209 / (download) - annotate - [select for diffs], Fri Nov 5 19:42:48 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.208: +6 -6
lines
Diff to previous 1.208 (colored)
indent: rename process_keyword_do to process_do, same for 'else' Before the symbols from the tokenizer had the prefix 'lsym', the symbols could not be simply called 'else' and 'do'. The functions for processing the tokens followed that naming scheme. When the prefix 'lsym' was introduced, the word 'keyword' was no longer needed, neither in the constants nor in the function names. No functional change.
Revision 1.208 / (download) - annotate - [select for diffs], Fri Nov 5 19:33:28 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.207: +3 -3
lines
Diff to previous 1.207 (colored)
indent: rename ps.curr_newline to next_col_1 For symmetry with ps.curr_col_1. No functional change.
Revision 1.207 / (download) - annotate - [select for diffs], Thu Nov 4 20:31:04 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.206: +31 -26
lines
Diff to previous 1.206 (colored)
indent: split process_comment_in_code into separate functions No functional change.
Revision 1.206 / (download) - annotate - [select for diffs], Thu Nov 4 17:12:12 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.205: +13 -3
lines
Diff to previous 1.205 (colored)
indent: fix joining of adjacent unary '+' operators
Revision 1.205 / (download) - annotate - [select for diffs], Wed Nov 3 21:47:35 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.204: +4 -5
lines
Diff to previous 1.204 (colored)
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.204 / (download) - annotate - [select for diffs], Mon Nov 1 23:44:08 2021 UTC (14 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.203: +3 -2
lines
Diff to previous 1.203 (colored)
indent: fix missing blank after 'return' (since 2021-10-31) In indent.c 1.200 from 2021-10-31, the subtypes of identifier tokens were removed since they were redundant. An unintended side effect was that a parenthesized expression after 'return' was no longer separated by a blank. Before that change, 'return' was tokenized as an lsym_ident with subtype kw_other, and want_space_before_lparen handled this case in the last line. After the change, 'return' was treated as an ordinary identifier, and unless the option '-pcs' (blank after function call) was given, the blank was removed. The other keywords that had kw_other are not affected since they do not expect a '(' afterwards. These keywords are 'break', 'continue', 'goto', 'inline' and 'restrict'. Curiously, there was not a single test case that covered 'return(expr)'. While here, remove the trailing ',' from the enum lexer_symbol, which is not allowed in standard C, it is a GNU extension. Lint doesn't complain about this since the default LINTFLAGS include '-g' for GCC mode.
Revision 1.203 / (download) - annotate - [select for diffs], Sun Oct 31 22:38:12 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.202: +3 -3
lines
Diff to previous 1.202 (colored)
indent: clean up Initialize buffers in reading order, make comments more expressive, rename add_typename to register_typename, remove unused macro. No functional change.
Revision 1.202 / (download) - annotate - [select for diffs], Sun Oct 31 21:43:43 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.201: +9 -9
lines
Diff to previous 1.201 (colored)
indent: for '-pcs', add blank between function and '(' Before indent-2021.09.30.21.48.12, the blank had always been added, even in '-npcs' mode. Since then, the blank had never been added. Now, add the blank in '-pcs' mode and omit it in '-npcs' mode.
Revision 1.201 / (download) - annotate - [select for diffs], Sun Oct 31 20:40:42 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.200: +3 -3
lines
Diff to previous 1.200 (colored)
indent: replace kw_tag with lsym_tag This leaves only one special type of token, which is lsym_ident, which in some cases represents a type name and in other cases an identifier, constant or string literal. No functional change.
Revision 1.200 / (download) - annotate - [select for diffs], Sun Oct 31 19:57:44 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.199: +3 -3
lines
Diff to previous 1.199 (colored)
indent: replace simple cases of keyword_kind with lexer_symbol The remaining keyword kinds 'tag' and 'type' require a bit more thought, so do them in a separate step. No functional change.
Revision 1.199 / (download) - annotate - [select for diffs], Sun Oct 31 19:20:52 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.198: +3 -3
lines
Diff to previous 1.198 (colored)
indent: rename lsym_type to better reflect reality Type names that occur in parentheses are parsed as lsym_ident having the subtype kw_type instead. No functional change.
Revision 1.198 / (download) - annotate - [select for diffs], Sun Oct 31 10:09:43 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.197: +6 -5
lines
Diff to previous 1.197 (colored)
indent: add separate lexer symbol for offsetof No functional change.
Revision 1.197 / (download) - annotate - [select for diffs], Sun Oct 31 10:00:37 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.196: +6 -3
lines
Diff to previous 1.196 (colored)
indent: add separate lexer symbol for sizeof The plan is to get rid of the type keyword_kind, which largely overlaps with lexer_symbol. No functional change.
Revision 1.196 / (download) - annotate - [select for diffs], Sat Oct 30 23:27:33 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.195: +13 -17
lines
Diff to previous 1.195 (colored)
indent: push down variable comment_buffered No functional change.
Revision 1.195 / (download) - annotate - [select for diffs], Sat Oct 30 22:36:07 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.194: +4 -4
lines
Diff to previous 1.194 (colored)
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.194 / (download) - annotate - [select for diffs], Sat Oct 30 20:01:46 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.193: +8 -7
lines
Diff to previous 1.193 (colored)
indent: reorder assignments in switch_buffer No functional change.
Revision 1.193 / (download) - annotate - [select for diffs], Sat Oct 30 18:58:04 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.192: +68 -68
lines
Diff to previous 1.192 (colored)
indent: move buffer functions further up No functional change.
Revision 1.192 / (download) - annotate - [select for diffs], Sat Oct 30 18:47:36 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.191: +6 -5
lines
Diff to previous 1.191 (colored)
indent: group variables by topic No functional change.
Revision 1.191 / (download) - annotate - [select for diffs], Sat Oct 30 17:55:44 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.190: +6 -4
lines
Diff to previous 1.190 (colored)
indent: prevent buffer overflow in search_stmt_comment printf '{ if (%010000d) /*comment*/ ; }' '0' | indent
Revision 1.190 / (download) - annotate - [select for diffs], Sat Oct 30 17:18:25 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.189: +27 -2
lines
Diff to previous 1.189 (colored)
indent: add debug logging for save_com This will help in finding the proper fix for the assertion failure in search_stmt_comment. Add an assertion in search_stmt_lbrace to prevent the previous, incomplete fix from being applied again.
Revision 1.189 / (download) - annotate - [select for diffs], Sat Oct 30 16:18:51 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.188: +48 -37
lines
Diff to previous 1.188 (colored)
indent: prevent buffer overflows in 'if (expr) ... stmt'
Revision 1.188 / (download) - annotate - [select for diffs], Sat Oct 30 15:26:58 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.187: +13 -6
lines
Diff to previous 1.187 (colored)
indent: revert previous fix of assertion failure The strange code with the out of bounds memory access is needed to transform 'if (expr) /* comment */ {' to 'if (expr) { /* comment */', that is, to move the comment to the right. Add a test that prevents "repairing" this code again.
Revision 1.187 / (download) - annotate - [select for diffs], Sat Oct 30 13:30:26 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.186: +6 -13
lines
Diff to previous 1.186 (colored)
indent: fix assertion failure in search_stmt_comment I have no idea why the code was written in such a convoluted way before. By removing all the code that didn't make sense, everything just works as expected, and the existing tests all pass, especially those in token_comment.c that mention search_stmt_comment.
Revision 1.186 / (download) - annotate - [select for diffs], Sat Oct 30 11:37:38 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.185: +5 -3
lines
Diff to previous 1.185 (colored)
indent: replace tabsize with hardcoded 8 in process_comma On 2018-07-25, FreeBSD added the option '-ts' to make the tabulator size configurable, replacing several constants 7, 8, 9 with tabsize. The 8 in the expression 'max_col - 8' was not related to the tabulator size but instead represents the typical width of a variable name. Subtracting a tab from the right margin doesn't make sense since the right margin need not be aligned on a tabstop. See the test fmt_decl.c, where the declaration 'struct s0 a,b;' is split into several lines because the estimate for the variable name following the comma is too high. There would have been plenty of space to the right to keep the whole declaration in a single line. No functional change.
Revision 1.185 / (download) - annotate - [select for diffs], Sat Oct 30 11:10:36 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.184: +3 -3
lines
Diff to previous 1.184 (colored)
indent: don't risk a buffer overflow in code_add_decl_indent The buffers have a safety margin of 5 characters, so the bounds check is not strictly necessary. It makes the code more uniform though. No functional change.
Revision 1.184 / (download) - annotate - [select for diffs], Sat Oct 30 11:05:26 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.183: +9 -17
lines
Diff to previous 1.183 (colored)
indent: clean up code_add_decl_indent In layout computations, it is helpful for human readers to list the summands in logical order. In this case, the expression 'code_len + base_ind' was rather confusing, so replace it with 'base_ind + code_len'. This makes the code straight-forward enough that it doesn't need any comments anymore. No functional change.
Revision 1.183 / (download) - annotate - [select for diffs], Sat Oct 30 10:59:07 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.182: +5 -5
lines
Diff to previous 1.182 (colored)
indent: remove confusing modulo from code_add_decl_indent The only effects of the modulo operation was to make indent slower and to confuse human readers. During the computation of the indentation, the main focus is on the difference between the current indentation, as computed from the base indentation and the current code, and the target indentation. All these computations take opt.tabsize into account. When looking only at the difference, whether or not a multiple of opt.tabsize is added does not matter. No functional change.
Revision 1.182 / (download) - annotate - [select for diffs], Sat Oct 30 10:01:31 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.181: +3 -5
lines
Diff to previous 1.181 (colored)
indent: inline bloated call to 'parse' during initialization No functional change.
Revision 1.181 / (download) - annotate - [select for diffs], Sat Oct 30 09:51:22 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.180: +9 -14
lines
Diff to previous 1.180 (colored)
indent: condense code for parsing command line arguments Previously, the cascade of 'if' statements suggested that there were 6 different cases to be handled when in reality there are only 3: no arguments, 1 argument, 2 arguments. Let the code express this directly. No functional change.
Revision 1.180 / (download) - annotate - [select for diffs], Sat Oct 30 09:42:31 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.179: +26 -18
lines
Diff to previous 1.179 (colored)
indent: extract main_load_profiles from main_parse_command_line No functional change.
Revision 1.179 / (download) - annotate - [select for diffs], Fri Oct 29 23:48:50 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.178: +3 -2
lines
Diff to previous 1.178 (colored)
indent: remove redundant comments, remove punctuation from debug log The comment about 'null stmt' between braces probably meant 'no statements between braces'. The comments at psym_switch_expr only repeated what the code says or had been outdated 29 years ago already since opt.case_indent does not have to be 'one level down'. In the debug log, the quotes around the symbol names are not necessary after a ':'. The parse stack also does not need this much punctuation. Reducing a do-while loop to nothing instead of a statement saves a few CPU cycles. It works because after each lbrace, a stmt is pushed to the parser stack. This stmt can only ever be reduced to a stmt_list but never be removed.
Revision 1.178 / (download) - annotate - [select for diffs], Fri Oct 29 21:56:36 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.177: +3 -3
lines
Diff to previous 1.177 (colored)
indent: fix missing blank before binary operator
Revision 1.177 / (download) - annotate - [select for diffs], Fri Oct 29 20:27:42 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.176: +7 -7
lines
Diff to previous 1.176 (colored)
indent: merge isblank and is_hspace into ch_isblank No functional change.
Revision 1.176 / (download) - annotate - [select for diffs], Fri Oct 29 20:05:58 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.175: +4 -2
lines
Diff to previous 1.175 (colored)
indent: replace segmentation fault with assertion
Revision 1.175 / (download) - annotate - [select for diffs], Fri Oct 29 19:31:24 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.174: +7 -7
lines
Diff to previous 1.174 (colored)
indent: initialize 'ps' via code This saves 3 kB of binary size since the parser state is rather large and only very few members are initialized to non-zero values. No functional change.
Revision 1.174 / (download) - annotate - [select for diffs], Fri Oct 29 19:22:55 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.173: +12 -27
lines
Diff to previous 1.173 (colored)
indent: clean up main_init_globals No functional change.
Revision 1.173 / (download) - annotate - [select for diffs], Fri Oct 29 19:12:48 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.172: +16 -13
lines
Diff to previous 1.172 (colored)
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.172 / (download) - annotate - [select for diffs], Fri Oct 29 18:50:52 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.171: +8 -2
lines
Diff to previous 1.171 (colored)
indent: mark obviously broken code
Revision 1.171 / (download) - annotate - [select for diffs], Fri Oct 29 17:50:37 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.170: +11 -11
lines
Diff to previous 1.170 (colored)
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.170 / (download) - annotate - [select for diffs], Fri Oct 29 17:32:22 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.169: +19 -20
lines
Diff to previous 1.169 (colored)
indent: rename ps.dumped_decl_indent and indent_declaration The word 'dump' in 'ps.dumped_decl_indent' was too close to dump_line, which led to confusion since the variable controls whether the indentation has been added to the code buffer, which happens way before actually dumping the current line to the output file. The function name 'indent_declaration' was too unspecific, it did not reveal where the indentation of the declaration actually happened. No functional change.
Revision 1.169 / (download) - annotate - [select for diffs], Fri Oct 29 16:59:35 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.168: +7 -8
lines
Diff to previous 1.168 (colored)
indent: keep p_l_follow nonnegative, use consistent comparison No functional change.
Revision 1.168 / (download) - annotate - [select for diffs], Fri Oct 29 16:54:51 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.167: +9 -9
lines
Diff to previous 1.167 (colored)
indent: spell 'parentheses' properly in messages and comments
Revision 1.167 / (download) - annotate - [select for diffs], Thu Oct 28 22:20:08 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.166: +7 -8
lines
Diff to previous 1.166 (colored)
indent: clean up indentation, comments, reduce No functional change.
Revision 1.166 / (download) - annotate - [select for diffs], Thu Oct 28 22:06:23 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.165: +5 -3
lines
Diff to previous 1.165 (colored)
indent: remove unused local variable in lexi Since the previous commit, lexi is always called with the same argument, so remove that parameter. The previous commit broke the debug logging by not printing "transient state" anymore. Replace this with "rolled back parser state" at the caller's site. No functional change.
Revision 1.165 / (download) - annotate - [select for diffs], Thu Oct 28 21:56:26 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.164: +8 -9
lines
Diff to previous 1.164 (colored)
indent: reduce negations in search_stmt_lookahead No functional change.
Revision 1.164 / (download) - annotate - [select for diffs], Thu Oct 28 21:51:43 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.163: +15 -15
lines
Diff to previous 1.163 (colored)
indent: clean up comments and function names Having accurate names for the lexer symbols and the parser symbols makes most of the comments redundant. Remove these. Rename process_decl to process_type, to match the name of the corresponding lexer symbol. In this phase, it's just a single type token, not a whole declaration. No functional change.
Revision 1.163 / (download) - annotate - [select for diffs], Thu Oct 28 21:32:49 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.162: +3 -3
lines
Diff to previous 1.162 (colored)
indent: make error messages for option parsing more precise
Revision 1.162 / (download) - annotate - [select for diffs], Tue Oct 26 21:37:27 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.161: +3 -3
lines
Diff to previous 1.161 (colored)
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.161 / (download) - annotate - [select for diffs], Tue Oct 26 20:43:35 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.160: +6 -7
lines
Diff to previous 1.160 (colored)
indent: make ps.keyword easier to understand Previously, ps.keyword did not have any documentation and was not straight-forward. In some cases it was reset to kw_0, in others it was set to an interesting value. The idea behind it was to remember the kind of word of the previous token, to decide whether to have a space between sizeof or offsetof and a following '('. No functional change.
Revision 1.160 / (download) - annotate - [select for diffs], Tue Oct 26 19:36:30 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.159: +8 -8
lines
Diff to previous 1.159 (colored)
indent: run indent on its own source code With manual corrections afterwards, to compensate for the remaining bugs in indent. Without the type definitions in .indent.pro, the opening braces of the functions kw_name and lexi_alnum would not be at the beginning of the line.
Revision 1.159 / (download) - annotate - [select for diffs], Mon Oct 25 21:33:24 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.158: +5 -3
lines
Diff to previous 1.158 (colored)
indent: improve debug logging Output the various details in chronological order.
Revision 1.158 / (download) - annotate - [select for diffs], Mon Oct 25 19:56:03 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.157: +20 -20
lines
Diff to previous 1.157 (colored)
indent: rename search_brace to search_stmt No functional change.
Revision 1.157 / (download) - annotate - [select for diffs], Mon Oct 25 01:06:13 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.156: +37 -36
lines
Diff to previous 1.156 (colored)
indent: rename local variable sp_sw to spaced_expr The 'sp' probably meant 'space-enclosed'; no idea what 'sw' was meant to mean. Maybe 'switch', but that would have been rather ambiguous when talking about control flow statements. No functional change.
Revision 1.156 / (download) - annotate - [select for diffs], Mon Oct 25 00:54:37 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.155: +108 -112
lines
Diff to previous 1.155 (colored)
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.155 / (download) - annotate - [select for diffs], Sun Oct 24 22:44:13 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.154: +7 -6
lines
Diff to previous 1.154 (colored)
indent: rename form_feed to tt_lex_form_feed No functional change.
Revision 1.154 / (download) - annotate - [select for diffs], Sun Oct 24 22:38:20 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.153: +16 -9
lines
Diff to previous 1.153 (colored)
indent: split kw_for_or_if_or_while into separate constants No functional change.
Revision 1.153 / (download) - annotate - [select for diffs], Sun Oct 24 22:28:06 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.152: +11 -11
lines
Diff to previous 1.152 (colored)
indent: split kw_do_or_else into separate constants It was unnecessarily confusing to have the token types keyword_do_else, keyword_do and keyword_else at the same time, without any hint in what they differed. Some of the token types seem to be used by the lexer while others are used in the parse stack. Maybe all token types can be partitioned into these groups, which would suggest to use two different types for them. And if not, it's still clearer to have this distinction in the names of the constants. No functional change.
Revision 1.152 / (download) - annotate - [select for diffs], Sun Oct 24 20:57:11 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.151: +15 -15
lines
Diff to previous 1.151 (colored)
indent: rename seen_quest to quest_level The new name aligns with other similar variables like ind_level, case_ind_level and ifdef_level. The old name 'seen' is mainly used for bool variables. No functional change.
Revision 1.151 / (download) - annotate - [select for diffs], Sun Oct 24 20:43:27 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.150: +6 -3
lines
Diff to previous 1.150 (colored)
indent: fix indentation of ad-hoc tagged variables Seen among others in usr.bin/indent/lexi.c, variable 'keywords'.
Revision 1.150 / (download) - annotate - [select for diffs], Sun Oct 24 19:33:26 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.149: +11 -16
lines
Diff to previous 1.149 (colored)
indent: initialize variables in main_loop in declaration No functional change.
Revision 1.149 / (download) - annotate - [select for diffs], Sun Oct 24 19:14:33 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.148: +19 -21
lines
Diff to previous 1.148 (colored)
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.148 / (download) - annotate - [select for diffs], Sun Oct 24 17:19:48 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.147: +18 -2
lines
Diff to previous 1.147 (colored)
indent: clean up format of warnings and errors Previously, warnings and errors had the form of C block comments. Before NetBSD io.c 1.20 from 2019-10-19, this format made sense because the diagnostics could end up in the same output stream as the formatted output. Since NetBSD io.c 1.20 from 2019-10-19, all diagnostics are redirected to stderr. This change was not mentioned in the commit message back then, it makes sense nevertheless. Since stdout and stderr now are properly separated, there is no need anymore to keep the weird format for warnings and errors. Switch to the standard 'error: file:line' format. Move the function 'diag' to indent.c to have access to the name of the current input file.
Revision 1.147 / (download) - annotate - [select for diffs], Sun Oct 24 16:51:44 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.146: +4 -2
lines
Diff to previous 1.146 (colored)
indent: fix line number counting at beginning of function body
Revision 1.146 / (download) - annotate - [select for diffs], Sun Oct 24 11:19:25 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.145: +6 -6
lines
Diff to previous 1.145 (colored)
indent: rename nitems to array_length
Revision 1.145 / (download) - annotate - [select for diffs], Sun Oct 24 11:17:05 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.144: +3 -4
lines
Diff to previous 1.144 (colored)
indent: replace global variable use_ff with function parameter
Revision 1.144 / (download) - annotate - [select for diffs], Wed Oct 20 05:37:21 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.143: +5 -6
lines
Diff to previous 1.143 (colored)
indent: rename ps.last_u_d to match its comment No functional change.
Revision 1.143 / (download) - annotate - [select for diffs], Wed Oct 20 05:26:46 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.142: +6 -6
lines
Diff to previous 1.142 (colored)
indent: rename parser stack variables No functional change.
Revision 1.142 / (download) - annotate - [select for diffs], Wed Oct 20 05:14:21 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.141: +13 -13
lines
Diff to previous 1.141 (colored)
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.141 / (download) - annotate - [select for diffs], Wed Oct 20 05:07:08 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.140: +11 -7
lines
Diff to previous 1.140 (colored)
indent: invert condition in process_newline It's hard to follow a condition that combines many negated terms with '||'. Group the conditions by their origin. The condition '!opt.break_after_comma && break_comma' still sounds like a contradition, more investigations to follow. No functional change.
Revision 1.140 / (download) - annotate - [select for diffs], Wed Oct 20 05:00:37 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.139: +4 -4
lines
Diff to previous 1.139 (colored)
indent: rename next_blank_lines to blank_lines_to_output The previous name was already an improvement over the name before that (n_real_blanklines), but didn't express the intended purpose clearly enough, so try another name. No functional change.
Revision 1.139 / (download) - annotate - [select for diffs], Tue Oct 19 18:29:59 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.138: +3 -3
lines
Diff to previous 1.138 (colored)
indent: if a file ends with indent off, don't add space-newline
Revision 1.138 / (download) - annotate - [select for diffs], Sun Oct 17 18:13:00 2021 UTC (15 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.137: +2 -6
lines
Diff to previous 1.137 (colored)
indent: parse int command line options strictly On i386 and other platforms where LONG_MAX == INT_MAX, the test t_errors/option_tabsize_very_large failed since the behavior on integer overflow differs between ILP32 and LP64 platforms. Noticed by gson@. Avoid this unintended difference by adding reasonable limits for each of the integer options and by replacing atoi with strtol.
Revision 1.137 / (download) - annotate - [select for diffs], Sat Oct 9 11:13:25 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.136: +8 -16
lines
Diff to previous 1.136 (colored)
indent: condense code for calculating indentations No functional change.
Revision 1.136 / (download) - annotate - [select for diffs], Sat Oct 9 11:00:27 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.135: +4 -4
lines
Diff to previous 1.135 (colored)
indent: extract common code for advancing a single tab No functional change.
Revision 1.135 / (download) - annotate - [select for diffs], Fri Oct 8 23:47:40 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.134: +17 -20
lines
Diff to previous 1.134 (colored)
indent: clean up comments, parentheses, debug messages, boolean operator No functional change.
Revision 1.134 / (download) - annotate - [select for diffs], Fri Oct 8 23:43:33 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.133: +12 -15
lines
Diff to previous 1.133 (colored)
indent: rename in_or_st to init_or_struct This makes a few comments redundant. No functional change.
Revision 1.133 / (download) - annotate - [select for diffs], Fri Oct 8 21:13:58 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.132: +4 -4
lines
Diff to previous 1.132 (colored)
indent: rename fill_buffer to inbuf_read_line No functional change.
Revision 1.132 / (download) - annotate - [select for diffs], Fri Oct 8 20:45:22 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.131: +7 -7
lines
Diff to previous 1.131 (colored)
indent: clean up process_decl, replace unnecessary strlen No functional change.
Revision 1.131 / (download) - annotate - [select for diffs], Fri Oct 8 20:33:18 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.130: +78 -81
lines
Diff to previous 1.130 (colored)
indent: remove unnecessary forward declarations No functional change.
Revision 1.130 / (download) - annotate - [select for diffs], Fri Oct 8 20:28:56 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.129: +5 -11
lines
Diff to previous 1.129 (colored)
indent: reduce negations in main_loop No functional change.
Revision 1.129 / (download) - annotate - [select for diffs], Fri Oct 8 20:14:52 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.128: +21 -18
lines
Diff to previous 1.128 (colored)
indent: fix parsing of preprocessor lines with comments and strings
Revision 1.128 / (download) - annotate - [select for diffs], Fri Oct 8 19:03:34 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.127: +4 -5
lines
Diff to previous 1.127 (colored)
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.127 / (download) - annotate - [select for diffs], Fri Oct 8 16:47:42 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.126: +30 -24
lines
Diff to previous 1.126 (colored)
indent: split process_keyword_do_else into separate functions No functional change.
Revision 1.126 / (download) - annotate - [select for diffs], Fri Oct 8 16:20:33 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.125: +7 -7
lines
Diff to previous 1.125 (colored)
indent: rename tokens lparen and rparen to be more precise No functional change.
Revision 1.125 / (download) - annotate - [select for diffs], Thu Oct 7 23:18:47 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.124: +11 -11
lines
Diff to previous 1.124 (colored)
indent: rename bp_save to saved_inp_s, be_save to saved_inp_e Using the same naming convention makes it easier to relate the variables. No functional change.
Revision 1.124 / (download) - annotate - [select for diffs], Thu Oct 7 23:15:15 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.123: +31 -34
lines
Diff to previous 1.123 (colored)
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.123 / (download) - annotate - [select for diffs], Thu Oct 7 23:01:32 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.122: +5 -4
lines
Diff to previous 1.122 (colored)
indent: move definition of bufsize from header to implementation No functional change.
Revision 1.122 / (download) - annotate - [select for diffs], Thu Oct 7 22:56:49 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.121: +12 -10
lines
Diff to previous 1.121 (colored)
indent: rename opt.btype_2 to brace_same_line No functional change.
Revision 1.121 / (download) - annotate - [select for diffs], Thu Oct 7 22:52:13 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.120: +3 -3
lines
Diff to previous 1.120 (colored)
indent: clean up code, remove outdated wrong comments No functional change.
Revision 1.120 / (download) - annotate - [select for diffs], Thu Oct 7 21:57:21 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.119: +4 -7
lines
Diff to previous 1.119 (colored)
indent: use braces around multi-line statements No functional change.
Revision 1.119 / (download) - annotate - [select for diffs], Thu Oct 7 21:52:54 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.118: +47 -3
lines
Diff to previous 1.118 (colored)
indent: let the code breathe a bit by inserting empty lines No functional change.
Revision 1.118 / (download) - annotate - [select for diffs], Thu Oct 7 21:43:20 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.117: +13 -15
lines
Diff to previous 1.117 (colored)
indent: clean up comments No functional change.
Revision 1.117 / (download) - annotate - [select for diffs], Thu Oct 7 21:41:59 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.116: +6 -8
lines
Diff to previous 1.116 (colored)
indent: fix wrong or outdated comments No functional change.
Revision 1.116 / (download) - annotate - [select for diffs], Thu Oct 7 21:38:25 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.115: +17 -19
lines
Diff to previous 1.115 (colored)
indent: remove redundant comments No functional change.
Revision 1.115 / (download) - annotate - [select for diffs], Thu Oct 7 21:16:36 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.114: +116 -115
lines
Diff to previous 1.114 (colored)
indent: reduce indentation No functional change.
Revision 1.114 / (download) - annotate - [select for diffs], Thu Oct 7 19:42:41 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.113: +3 -3
lines
Diff to previous 1.113 (colored)
indent: remove global variable option_source It is only needed at startup, while parsing the options. The string "?" was not needed at all. No functional change.
Revision 1.113 / (download) - annotate - [select for diffs], Thu Oct 7 19:35:50 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.112: +11 -14
lines
Diff to previous 1.112 (colored)
indent: clean up colon handling No functional change.
Revision 1.112 / (download) - annotate - [select for diffs], Thu Oct 7 19:17:07 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.111: +68 -84
lines
Diff to previous 1.111 (colored)
indent: add high-level API for working with buffers This makes the code more boring to read, which is actually good. Less fiddling with memcpy and pointer arithmetics. Since indent is not a high-performance tool used for bulk operations on terabytes of source code, there is no need to squeeze out every possible CPU cycle. No functional change.
Revision 1.111 / (download) - annotate - [select for diffs], Thu Oct 7 18:48:31 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.110: +12 -12
lines
Diff to previous 1.110 (colored)
indent: rename copy_id to copy_token No functional change.
Revision 1.110 / (download) - annotate - [select for diffs], Thu Oct 7 18:32:09 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.109: +17 -11
lines
Diff to previous 1.109 (colored)
indent: raise WARNS from the default 5 up to 6
Revision 1.109 / (download) - annotate - [select for diffs], Thu Oct 7 18:19:07 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.108: +6 -2
lines
Diff to previous 1.108 (colored)
indent: prevent division by zero
Revision 1.108 / (download) - annotate - [select for diffs], Tue Oct 5 18:50:42 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.107: +4 -4
lines
Diff to previous 1.107 (colored)
indent: rename n_real_blanklines The word 'n' was not as helpful as possible, the word 'real' did not give any clue at all about the variable's purpose. No functional change.
Revision 1.107 / (download) - annotate - [select for diffs], Tue Oct 5 17:14:45 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.106: +3 -3
lines
Diff to previous 1.106 (colored)
indent: fix off-by-one error for indented first line
Revision 1.106 / (download) - annotate - [select for diffs], Tue Oct 5 17:12:20 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.105: +7 -7
lines
Diff to previous 1.105 (colored)
indent: make off-by-one error in main_prepare_parsing more visible No functional change.
Revision 1.105 / (download) - annotate - [select for diffs], Tue Oct 5 16:33:25 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.104: +53 -54
lines
Diff to previous 1.104 (colored)
indent: make variable names more expressive The abbreviation 'dec' looked too much like 'decimal' instead of the intended 'declaration'. No functional change.
Revision 1.104 / (download) - annotate - [select for diffs], Tue Oct 5 07:05:51 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.103: +72 -72
lines
Diff to previous 1.103 (colored)
indent: remove variable name prefix 'inout_' This makes the variable names more readable. The prefix is not actually needed to understand the code, it is rather distracting. The compiler and lint will guard against any accidental mismatch between pointer, integer and bool. No functional change.
Revision 1.103 / (download) - annotate - [select for diffs], Tue Oct 5 06:55:24 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.102: +17 -24
lines
Diff to previous 1.102 (colored)
indent: fix Clang-Tidy warnings, clean up bakcopy The comment above and inside bakcopy had been outdated for at least the last 28 years, the backup file is named "%s.BAK", not ".B%s". Prevent buffer overflow for very long filenames (sprintf -> snprintf).
Revision 1.102 / (download) - annotate - [select for diffs], Tue Oct 5 06:49:19 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.101: +11 -11
lines
Diff to previous 1.101 (colored)
indent: fix spelling in comments
Revision 1.101 / (download) - annotate - [select for diffs], Tue Oct 5 06:09:42 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.100: +6 -6
lines
Diff to previous 1.100 (colored)
indent: merge duplicate code into is_hspace No functional change.
Revision 1.100 / (download) - annotate - [select for diffs], Tue Oct 5 05:56:49 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.99: +12 -13
lines
Diff to previous 1.99 (colored)
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.99 / (download) - annotate - [select for diffs], Tue Oct 5 05:39:14 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.98: +12 -24
lines
Diff to previous 1.98 (colored)
indent: merge duplicate code for reading from input buffer No functional change.
Revision 1.98 / (download) - annotate - [select for diffs], Sun Oct 3 18:44:51 2021 UTC (15 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.97: +3 -3
lines
Diff to previous 1.97 (colored)
indent: rename functions There was no good reason for using the different verbs 'scan' and 'set' for two functions that essentially do the same. No functional change.
Revision 1.97 / (download) - annotate - [select for diffs], Sun Oct 3 18:41:36 2021 UTC (15 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.96: +3 -3
lines
Diff to previous 1.96 (colored)
indent: fix content of profile_name Previously, profile_name included the leading "-P", which was confusing.
Revision 1.96 / (download) - annotate - [select for diffs], Thu Sep 30 21:48:12 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.95: +4 -2
lines
Diff to previous 1.95 (colored)
indent: remove space between ')' and '(' in declarations
Revision 1.95 / (download) - annotate - [select for diffs], Thu Sep 30 21:38:43 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.94: +11 -7
lines
Diff to previous 1.94 (colored)
indent: untangle want_blank_before_lparen No functional change.
Revision 1.94 / (download) - annotate - [select for diffs], Thu Sep 30 21:33:55 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.93: +13 -7
lines
Diff to previous 1.93 (colored)
indent: extract want_blank_before_lparen No functional change.
Revision 1.93 / (download) - annotate - [select for diffs], Thu Sep 30 20:58:26 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.92: +4 -5
lines
Diff to previous 1.92 (colored)
indent: add space between ',' and '[' in C99 initializations
Revision 1.92 / (download) - annotate - [select for diffs], Mon Sep 27 20:09:55 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.91: +19 -21
lines
Diff to previous 1.91 (colored)
indent: let indent format the comments after previous refactoring Before this refactoring, I had skipped this section of the code from formatting since the 'default:' branch was enclosed in a block of its own, and that block would have been indented one more level to the right. Extracting that code into a separate function got rid of the extra braces. No functional change.
Revision 1.91 / (download) - annotate - [select for diffs], Mon Sep 27 20:00:41 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.90: +201 -163
lines
Diff to previous 1.90 (colored)
indent: split search_brace into smaller functions No functional change.
Revision 1.90 / (download) - annotate - [select for diffs], Mon Sep 27 18:21:47 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.89: +2 -3
lines
Diff to previous 1.89 (colored)
indent: use binary instead of linear search when adding types No functional change.
Revision 1.89 / (download) - annotate - [select for diffs], Mon Sep 27 16:56:35 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.88: +5 -5
lines
Diff to previous 1.88 (colored)
indent: rename rwcode to keyword_kind, various cleanup No idea what the 'rw' in 'rwcode' meant, it had been imported that way 28 years ago. Since rwcode specifies the kind of a keyword, the prefix 'kw_' makes sense. No functional change.
Revision 1.88 / (download) - annotate - [select for diffs], Sun Sep 26 21:23:31 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.87: +14 -22
lines
Diff to previous 1.87 (colored)
indent: unexport global variables The variable match_state was write-only and was thus removed. No functional change.
Revision 1.87 / (download) - annotate - [select for diffs], Sun Sep 26 19:57:23 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.86: +5 -6
lines
Diff to previous 1.86 (colored)
indent: negate and rename option.leave_comma The old name did not mirror the description in the manual page, and it was the only option that is negated. Inverting it allows the options table to be compressed.
Revision 1.86 / (download) - annotate - [select for diffs], Sun Sep 26 19:37:11 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.85: +144 -146
lines
Diff to previous 1.85 (colored)
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.85 / (download) - annotate - [select for diffs], Sun Sep 26 18:52:16 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.84: +4 -2
lines
Diff to previous 1.84 (colored)
indent: fix missing space between comma and ellipsis According to lint's C grammar, in standard C an ellipsis only occurs after a comma. There are GCC extensions that allow an ellipsis as the only function parameter, as well as in 'case a ... b', but these are rare.
Revision 1.84 / (download) - annotate - [select for diffs], Sat Sep 25 22:57:04 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.83: +4 -4
lines
Diff to previous 1.83 (colored)
indent: misc cleanup No functional change.
Revision 1.83 / (download) - annotate - [select for diffs], Sat Sep 25 22:54:32 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.82: +5 -5
lines
Diff to previous 1.82 (colored)
indent: convert found_err to bool That variable had slipped through the migration since it consequently used int for the declaration, the definition and all assignments. No functional change.
Revision 1.82 / (download) - annotate - [select for diffs], Sat Sep 25 22:24:35 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.81: +11 -24
lines
Diff to previous 1.81 (colored)
indent: use strlen instead of own implementation The two loops looks similar but differ in a crucial detail that makes up for a '+ 1'. No functional change.
Revision 1.81 / (download) - annotate - [select for diffs], Sat Sep 25 22:14:21 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.80: +17 -20
lines
Diff to previous 1.80 (colored)
indent: merge duplicate code for token buffers No functional change.
Revision 1.80 / (download) - annotate - [select for diffs], Sat Sep 25 21:42:43 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.79: +21 -26
lines
Diff to previous 1.79 (colored)
indent: clean up argument handling No functional change.
Revision 1.79 / (download) - annotate - [select for diffs], Sat Sep 25 20:56:53 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.78: +20 -19
lines
Diff to previous 1.78 (colored)
indent: un-abbreviate a few parser_state members, clean up comments No functional change.
Revision 1.78 / (download) - annotate - [select for diffs], Sat Sep 25 20:23:42 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.77: +2 -3
lines
Diff to previous 1.77 (colored)
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.77 / (download) - annotate - [select for diffs], Sat Sep 25 19:49:13 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.76: +2 -3
lines
Diff to previous 1.76 (colored)
indent: reduce code and data size for lexing of numbers Instead of having a table of strings (121 pointers + 121 data relocations), reduce that table to the actual character data and use a secondary table for looking up the correct row in the main table. No functional change.
Revision 1.76 / (download) - annotate - [select for diffs], Sat Sep 25 18:49:03 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.75: +3 -3
lines
Diff to previous 1.75 (colored)
indent: rename option variable to be more expressive No functional change.
Revision 1.75 / (download) - annotate - [select for diffs], Sat Sep 25 17:36:51 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.74: +35 -39
lines
Diff to previous 1.74 (colored)
indent: convert remaining ibool to bool No functional change intended.
Revision 1.74 / (download) - annotate - [select for diffs], Sat Sep 25 17:29:13 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.73: +3 -3
lines
Diff to previous 1.73 (colored)
indent: convert parser_state from ibool to bool indent.c:400:5: error: suggest parentheses around assignment used as truth value io.c:271:32: error: ãàÏßãàon a boolean expression No functional change intended.
Revision 1.73 / (download) - annotate - [select for diffs], Sat Sep 25 17:11:23 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.72: +70 -66
lines
Diff to previous 1.72 (colored)
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.72 / (download) - annotate - [select for diffs], Sat Sep 25 14:26:05 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.71: +17 -17
lines
Diff to previous 1.71 (colored)
indent: merge duplicate code for initializing buffers No functional change.
Revision 1.71 / (download) - annotate - [select for diffs], Sat Sep 25 14:16:06 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.70: +24 -33
lines
Diff to previous 1.70 (colored)
indent: clean up initialization of options The default values in 'struct pro' were redundant but all consistent, even with the commented defaults in main_parse_command_line. No functional change.
Revision 1.70 / (download) - annotate - [select for diffs], Sat Sep 25 13:38:32 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.69: +2 -6
lines
Diff to previous 1.69 (colored)
indent: remove ifdef for lint NetBSD lint does not need them anymore, FreeBSD does not have lint.
Revision 1.69 / (download) - annotate - [select for diffs], Sat Sep 25 10:41:03 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.68: +4 -5
lines
Diff to previous 1.68 (colored)
indent: move statistical values into a separate struct No functional change.
Revision 1.68 / (download) - annotate - [select for diffs], Sat Sep 25 08:23:31 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.67: +35 -23
lines
Diff to previous 1.67 (colored)
indent: add nonnull memory allocation functions The only functional change is a single error message.
Revision 1.67 / (download) - annotate - [select for diffs], Sat Sep 25 08:04:13 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.66: +31 -35
lines
Diff to previous 1.66 (colored)
indent: group global variables for token buffer No functional change.
Revision 1.66 / (download) - annotate - [select for diffs], Sat Sep 25 07:59:52 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.65: +20 -20
lines
Diff to previous 1.65 (colored)
indent: inline macro 'token' No functional change.
Revision 1.65 / (download) - annotate - [select for diffs], Sat Sep 25 07:55:24 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.64: +78 -83
lines
Diff to previous 1.64 (colored)
indent: group global variables for code buffer No functional change.
Revision 1.64 / (download) - annotate - [select for diffs], Sat Sep 25 07:46:41 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.63: +38 -39
lines
Diff to previous 1.63 (colored)
indent: rename variables of type token_type The previous variable name 'code' conflicts with the buffer of the same name. No functional change.
Revision 1.63 / (download) - annotate - [select for diffs], Fri Sep 24 18:47:29 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.62: +50 -53
lines
Diff to previous 1.62 (colored)
indent: group global variables for label buffer into struct No functional change.
Revision 1.62 / (download) - annotate - [select for diffs], Fri Sep 24 18:14:06 2021 UTC (16 months ago) by rillig
Branch: MAIN
Changes since 1.61: +16 -19
lines
Diff to previous 1.61 (colored)
indent: group global variables for the comment buffer No functional change.
Revision 1.61 / (download) - annotate - [select for diffs], Wed Aug 25 22:26:30 2021 UTC (17 months ago) by rillig
Branch: MAIN
Changes since 1.60: +11 -21
lines
Diff to previous 1.60 (colored)
indent: fix lint warnings about type conversions on ilp32 No functional change.
Revision 1.60 / (download) - annotate - [select for diffs], Fri Mar 26 22:02:00 2021 UTC (22 months ago) by rillig
Branch: MAIN
CVS Tags: cjep_sun2x-base1,
cjep_sun2x-base,
cjep_sun2x,
cjep_staticlib_x-base1,
cjep_staticlib_x-base,
cjep_staticlib_x
Changes since 1.59: +5 -5
lines
Diff to previous 1.59 (colored)
indent: fix Clang build everywhere but on amd64 No idea why Clang didn't complain about this on amd64, only on all other platforms.
Revision 1.59 / (download) - annotate - [select for diffs], Sun Mar 14 00:22:16 2021 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.58: +20 -19
lines
Diff to previous 1.58 (colored)
indent: fix lint warnings No functional change.
Revision 1.58 / (download) - annotate - [select for diffs], Sat Mar 13 18:46:39 2021 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.57: +13 -6
lines
Diff to previous 1.57 (colored)
indent: add debug logging for switching the input buffer No functional change outside debug mode.
Revision 1.57 / (download) - annotate - [select for diffs], Sat Mar 13 13:51:08 2021 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.56: +16 -14
lines
Diff to previous 1.56 (colored)
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.56 / (download) - annotate - [select for diffs], Sat Mar 13 13:25:23 2021 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.55: +5 -5
lines
Diff to previous 1.55 (colored)
indent: rename pr_comment to process_comment, clean up documentation No functional change.
Revision 1.55 / (download) - annotate - [select for diffs], Sat Mar 13 13:14:14 2021 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.54: +10 -6
lines
Diff to previous 1.54 (colored)
indent: fix handling of '/*' in string literal in preprocessing line Previously, the '/*' in the string literal had been interpreted as the beginning of a comment, which was wrong. Because of that, the variable declaration in the following line was still interpreted as part of the comment. The comment even continued until the end of the file. Due to indent's forgiving nature, it neither complained nor even mentioned that anything had gone wrong. The decision of rather producing wrong output than failing early is a dangerous one. At least, there should have been an error message that at the end of the file, the parser was still in a a comment, expecting the closing '*/'.
Revision 1.54 / (download) - annotate - [select for diffs], Sat Mar 13 12:52:24 2021 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.53: +748 -608
lines
Diff to previous 1.53 (colored)
indent: split 'main_loop' into several functions No functional change.
Revision 1.53 / (download) - annotate - [select for diffs], Sat Mar 13 11:47:22 2021 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.52: +76 -65
lines
Diff to previous 1.52 (colored)
indent: split 'main' into manageable parts Since several years (maybe even decades) compilers know how to inline static functions that are only used once. Therefore there is no need to have overly long functions anymore, especially not 'main', which is only called a single time and thus does not add any noticeable performance degradation. No functional change.
Revision 1.52 / (download) - annotate - [select for diffs], Sat Mar 13 11:27:01 2021 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.51: +8 -10
lines
Diff to previous 1.51 (colored)
indent: remove redundant parentheses No functional change.
Revision 1.51 / (download) - annotate - [select for diffs], Sat Mar 13 11:19:43 2021 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.50: +8 -8
lines
Diff to previous 1.50 (colored)
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.50 / (download) - annotate - [select for diffs], Sat Mar 13 10:32:25 2021 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.49: +7 -5
lines
Diff to previous 1.49 (colored)
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.49 / (download) - annotate - [select for diffs], Sat Mar 13 10:06:47 2021 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.48: +3 -3
lines
Diff to previous 1.48 (colored)
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.48 / (download) - annotate - [select for diffs], Sat Mar 13 09:21:57 2021 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.47: +45 -2
lines
Diff to previous 1.47 (colored)
indent: add debug logging for actually writing to the output file Together with the results of the tokenizer and the 4 buffers for token, label, code and comment, the debug log now provides a good high-level view on how the indentation happens and where to look for the many remaining bugs.
Revision 1.47 / (download) - annotate - [select for diffs], Sat Mar 13 00:26:56 2021 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.46: +3 -3
lines
Diff to previous 1.46 (colored)
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.46 / (download) - annotate - [select for diffs], Fri Mar 12 23:16:00 2021 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.45: +3 -3
lines
Diff to previous 1.45 (colored)
indent: replace 'target' with 'indent' in function names The word 'target' was not as specific as possible. No functional change.
Revision 1.45 / (download) - annotate - [select for diffs], Fri Mar 12 23:10:18 2021 UTC (22 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.44: +18 -34
lines
Diff to previous 1.44 (colored)
indent: use consistent indentation for 'else' Half of the code used -ce, the other half the opposite -nce. No functional change.
Revision 1.44 / (download) - annotate - [select for diffs], Fri Mar 12 00:15:34 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.43: +3 -3
lines
Diff to previous 1.43 (colored)
indent: manually fix indentation No functional change.
Revision 1.43 / (download) - annotate - [select for diffs], Thu Mar 11 22:32:06 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.42: +24 -22
lines
Diff to previous 1.42 (colored)
indent: reduce indentation of check_size functions No functional change.
Revision 1.42 / (download) - annotate - [select for diffs], Thu Mar 11 22:28:30 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.41: +9 -9
lines
Diff to previous 1.41 (colored)
indent: remove redundant cast after allocation functions No functional change.
Revision 1.41 / (download) - annotate - [select for diffs], Tue Mar 9 19:46:28 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.40: +186 -182
lines
Diff to previous 1.40 (colored)
indent: extract search_brace from main No functional change.
Revision 1.40 / (download) - annotate - [select for diffs], Tue Mar 9 19:32:41 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.39: +21 -14
lines
Diff to previous 1.39 (colored)
indent: extract capsicum code out of the main function No functional change.
Revision 1.39 / (download) - annotate - [select for diffs], Tue Mar 9 19:23:08 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.38: +11 -9
lines
Diff to previous 1.38 (colored)
indent: rename a few more token types The previous names were either too short or ambiguous. No functional change.
Revision 1.38 / (download) - annotate - [select for diffs], Tue Mar 9 19:14:39 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.37: +12 -11
lines
Diff to previous 1.37 (colored)
indent: make token names more precise The previous 'casestmt' was wrong since a case label is not a statement at all. The previous 'swstmt' was overly short, and wrong as well, since it represents only the 'switch (expr)' part, which is not a complete switch statement. Same for 'ifstmt', 'whilestmt', 'forstmt'. The previous word 'head' was not precise enough since it didn't specify exactly where the head ends and the body starts. Especially for handling the dangling else, this distinction is important. No functional change.
Revision 1.37 / (download) - annotate - [select for diffs], Tue Mar 9 18:28:10 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.36: +7 -7
lines
Diff to previous 1.36 (colored)
indent: rename a few tokens to be more obvious For casual readers it is not obvious whether the 'sp' meant 'special' or 'space' or something entirely different.
Revision 1.36 / (download) - annotate - [select for diffs], Tue Mar 9 16:48:28 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.35: +10 -10
lines
Diff to previous 1.35 (colored)
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.35 / (download) - annotate - [select for diffs], Mon Mar 8 20:20:11 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.34: +3 -3
lines
Diff to previous 1.34 (colored)
indent: inline macro for backslash No functional change.
Revision 1.34 / (download) - annotate - [select for diffs], Mon Mar 8 20:15:42 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.33: +45 -15
lines
Diff to previous 1.33 (colored)
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.33 / (download) - annotate - [select for diffs], Mon Mar 8 19:06:48 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.32: +3 -3
lines
Diff to previous 1.32 (colored)
indent: fix printing of uninitialized 'token' in debug output
Revision 1.32 / (download) - annotate - [select for diffs], Sun Mar 7 20:52:11 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.31: +4 -5
lines
Diff to previous 1.31 (colored)
indent: sprinkle a few const No functional change.
Revision 1.31 / (download) - annotate - [select for diffs], Sun Mar 7 20:30:48 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.30: +5 -7
lines
Diff to previous 1.30 (colored)
indent: use named constants for the different types of keywords This reduces the magic numbers in the code. Most of these had their designated constant name written in a nearby comment anyway. The one instance where arithmetic was performed on this new enum type (in indent.c) was a bit tricky to understand. The combination rw_continue_or_inline_or_restrict looks strange, the 'continue' should intuitively belong to the other control flow keywords in rw_break_or_goto_or_return. No functional change.
Revision 1.30 / (download) - annotate - [select for diffs], Sun Mar 7 10:56:18 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.29: +10 -7
lines
Diff to previous 1.29 (colored)
indent: for the token types, use enum instead of #define This makes it easier to step through the code in a debugger. No functional change.
Revision 1.29 / (download) - annotate - [select for diffs], Sun Mar 7 10:42:48 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.28: +3 -4
lines
Diff to previous 1.28 (colored)
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.28 / (download) - annotate - [select for diffs], Sat Mar 6 20:30:06 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.27: +3 -3
lines
Diff to previous 1.27 (colored)
indent: fix space-tab alignment in indent's own code These parts are not fixed automatically by indent since they are in box comments. No functional change.
Revision 1.27 / (download) - annotate - [select for diffs], Thu Apr 23 00:17:34 2020 UTC (2 years, 9 months ago) by joerg
Branch: MAIN
Changes since 1.26: +56 -2
lines
Diff to previous 1.26 (colored)
Avoid common symbol declarations
Revision 1.23.14.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:42 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.23.14.1: +19 -19
lines
Diff to previous 1.23.14.1 (colored) to branchpoint 1.23 (colored) next main 1.24 (colored)
Mostly merge changes from HEAD upto 20200411
Revision 1.26 / (download) - annotate - [select for diffs], Sat Oct 19 15:44:31 2019 UTC (3 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-20200421,
phil-wifi-20200411,
phil-wifi-20200406,
phil-wifi-20191119,
is-mlppp-base,
is-mlppp
Changes since 1.25: +19 -19
lines
Diff to previous 1.25 (colored)
use stdarg, annotate function as __printflike and fix broken formats.
Revision 1.23.14.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:10:20 2019 UTC (3 years, 7 months ago) by christos
Branch: phil-wifi
Changes since 1.23: +1194 -1198
lines
Diff to previous 1.23 (colored)
Sync with HEAD
Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Thu Apr 4 20:39:17 2019 UTC (3 years, 9 months ago) by kamil
Branch: FREEBSD,
CSRG
CVS Tags: r340138
Changes since 1.1.1.1: +569 -457
lines
Diff to previous 1.1.1.1 (colored)
FreeBSD indent r340138
Revision 1.25 / (download) - annotate - [select for diffs], Thu Apr 4 15:22:13 2019 UTC (3 years, 9 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20190609,
netbsd-9-base,
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
Changes since 1.24: +1194 -1201
lines
Diff to previous 1.24 (colored)
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.24 / (download) - annotate - [select for diffs], Sun Feb 3 03:19:29 2019 UTC (3 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.23: +5 -2
lines
Diff to previous 1.23 (colored)
- add or adjust /* FALLTHROUGH */ where appropriate - add __unreachable() after functions that can return but won't in this case, and thus can't be marked __dead easily
Revision 1.23 / (download) - annotate - [select for diffs], Mon Sep 5 00:40:29 2016 UTC (6 years, 4 months ago) by sevan
Branch: MAIN
CVS Tags: prg-localcount2-base3,
prg-localcount2-base2,
prg-localcount2-base1,
prg-localcount2-base,
prg-localcount2,
phil-wifi-base,
pgoyette-localcount-20170426,
pgoyette-localcount-20170320,
pgoyette-localcount-20170107,
pgoyette-localcount-20161104,
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-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
Changes since 1.22: +2 -4
lines
Diff to previous 1.22 (colored)
Drop main() prototype.
Revision 1.22 / (download) - annotate - [select for diffs], Thu Feb 25 13:23:27 2016 UTC (6 years, 11 months ago) by ginsbach
Branch: MAIN
CVS Tags: pgoyette-localcount-base,
pgoyette-localcount-20160806,
pgoyette-localcount-20160726,
pgoyette-localcount
Changes since 1.21: +17 -17
lines
Diff to previous 1.21 (colored)
Fix obvious contraction spelling mistakes by adding missing apostrophes.
Revision 1.21 / (download) - annotate - [select for diffs], Mon Feb 22 22:01:48 2016 UTC (6 years, 11 months ago) by ginsbach
Branch: MAIN
Changes since 1.20: +3 -3
lines
Diff to previous 1.20 (colored)
Use warnx(3).
Revision 1.20 / (download) - annotate - [select for diffs], Mon Feb 22 19:04:18 2016 UTC (6 years, 11 months ago) by ginsbach
Branch: MAIN
Changes since 1.19: +4 -6
lines
Diff to previous 1.19 (colored)
Use errx(3).
Revision 1.18.24.1 / (download) - annotate - [select for diffs], Sun Sep 21 18:58:56 2014 UTC (8 years, 4 months ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116,
netbsd-7-nhusb-base,
netbsd-7-nhusb,
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
Changes since 1.18: +39 -4
lines
Diff to previous 1.18 (colored) next main 1.19 (colored)
Pull up following revision(s) (requested by mrg in ticket #110): usr.bin/indent/io.c: revision 1.15 usr.bin/indent/indent_globs.h: revision 1.10 usr.bin/indent/args.c: revision 1.11 usr.bin/indent/indent.1: revision 1.23 usr.bin/indent/indent.c: revision 1.19 port the -ut / -nut options from freebsd. -ut (default) enables tabs in output, the -nut uses spaces.
Revision 1.19 / (download) - annotate - [select for diffs], Thu Sep 4 04:06:07 2014 UTC (8 years, 4 months ago) by mrg
Branch: MAIN
Changes since 1.18: +39 -4
lines
Diff to previous 1.18 (colored)
port the -ut / -nut options from freebsd. -ut (default) enables tabs in output, the -nut uses spaces.
Revision 1.17.6.1 / (download) - annotate - [select for diffs], Wed May 13 19:19:52 2009 UTC (13 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.17: +12 -12
lines
Diff to previous 1.17 (colored) next main 1.18 (colored)
Sync with HEAD. Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
Revision 1.18 / (download) - annotate - [select for diffs], Sun Apr 12 11:09:49 2009 UTC (13 years, 9 months ago) by lukem
Branch: MAIN
CVS Tags: 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,
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-base,
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,
matt-premerge-20091211,
matt-nb6-plus-nbase,
matt-nb6-plus-base,
matt-nb6-plus,
matt-mips64-premerge-20101231,
jym-xensuspend-nbase,
jym-xensuspend-base,
cherry-xenmp-base,
cherry-xenmp,
bouyer-quota2-nbase,
bouyer-quota2-base,
bouyer-quota2,
agc-symver-base,
agc-symver
Branch point for: netbsd-7
Changes since 1.17: +12 -12
lines
Diff to previous 1.17 (colored)
Fix WARNS=4 issues (-Wshadow -Wcast-qual -Wsign-compare)
Revision 1.16.28.1 / (download) - annotate - [select for diffs], Thu Sep 18 04:29:13 2008 UTC (14 years, 4 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.16: +6 -6
lines
Diff to previous 1.16 (colored) next main 1.17 (colored)
Sync with wrstuden-revivesa-base-2.
Revision 1.17 / (download) - annotate - [select for diffs], Mon Jul 21 14:19:23 2008 UTC (14 years, 6 months ago) by lukem
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3,
wrstuden-revivesa-base-2,
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,
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-base2
Branch point for: jym-xensuspend
Changes since 1.16: +6 -6
lines
Diff to previous 1.16 (colored)
Remove the \n and tabs from the __COPYRIGHT() strings. Tweak to use a consistent format.
Revision 1.16 / (download) - annotate - [select for diffs], Sat Oct 30 17:45:34 2004 UTC (18 years, 3 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-pf42-baseX,
yamt-pf42-base4,
yamt-pf42-base3,
yamt-pf42-base2,
yamt-pf42-base,
yamt-pf42,
wrstuden-revivesa-base-1,
wrstuden-revivesa-base,
wrstuden-fixsa-newbase,
wrstuden-fixsa-base-1,
wrstuden-fixsa-base,
wrstuden-fixsa,
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,
matt-mips64-base,
matt-mips64,
matt-armv6-prevmlocking,
matt-armv6-nbase,
matt-armv6-base,
matt-armv6,
keiichi-mipv6-nbase,
keiichi-mipv6-base,
keiichi-mipv6,
hpcarm-cleanup-nbase,
hpcarm-cleanup-base,
hpcarm-cleanup,
cube-autoconf-base,
cube-autoconf,
chap-midi-nbase,
chap-midi-base,
chap-midi,
abandoned-netbsd-4-base,
abandoned-netbsd-4
Branch point for: wrstuden-revivesa
Changes since 1.15: +5 -4
lines
Diff to previous 1.15 (colored)
Add (unsigned char) cast to ctype functions
Revision 1.15 / (download) - annotate - [select for diffs], Thu Aug 7 11:14:08 2003 UTC (19 years, 5 months ago) by agc
Branch: MAIN
CVS Tags: 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
Changes since 1.14: +29 -2
lines
Diff to previous 1.14 (colored)
Move UCB-licensed code from 4-clause to 3-clause licence. Patches provided by Joel Baker in PR 22365, verified by myself.
Revision 1.14 / (download) - annotate - [select for diffs], Thu Jun 19 15:45:22 2003 UTC (19 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.13: +5 -2
lines
Diff to previous 1.13 (colored)
PR/21645: Mishka: Localized comments don't work with indent.
Revision 1.13 / (download) - annotate - [select for diffs], Sun May 26 22:53:38 2002 UTC (20 years, 8 months ago) by wiz
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.12: +5 -7
lines
Diff to previous 1.12 (colored)
Remove #ifndef'd __STDC__ code. ANSIfy.
Revision 1.12 / (download) - annotate - [select for diffs], Mon Aug 20 12:00:55 2001 UTC (21 years, 5 months ago) by wiz
Branch: MAIN
CVS Tags: 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
Changes since 1.11: +3 -3
lines
Diff to previous 1.11 (colored)
precede, not preceed.
Revision 1.11 / (download) - annotate - [select for diffs], Sat Jun 16 21:47:42 2001 UTC (21 years, 7 months ago) by kleink
Branch: MAIN
Changes since 1.10: +3 -3
lines
Diff to previous 1.10 (colored)
Handle a labeled statement at the beginning of a function correctly; from Nagae Hidetake <nagae@tk.airnet.ne.jp> in PR bin/12781.
Revision 1.10 / (download) - annotate - [select for diffs], Sat Dec 19 17:00:08 1998 UTC (24 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: wrstuden-devbsize-base,
wrstuden-devbsize-19991221,
wrstuden-devbsize,
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,
minoura-xpg4dl-base,
minoura-xpg4dl,
comdex-fall-1999-base,
comdex-fall-1999
Changes since 1.9: +7 -7
lines
Diff to previous 1.9 (colored)
char -> unsigned char, braces for gcc-2.8.1
Revision 1.9 / (download) - annotate - [select for diffs], Thu Oct 8 01:30:27 1998 UTC (24 years, 3 months ago) by wsanchez
Branch: MAIN
Changes since 1.8: +4 -2
lines
Diff to previous 1.8 (colored)
Get rid of multiply defined common symbols
Revision 1.8 / (download) - annotate - [select for diffs], Sun Sep 6 20:17:30 1998 UTC (24 years, 5 months ago) by mellon
Branch: MAIN
Changes since 1.7: +4 -5
lines
Diff to previous 1.7 (colored)
Support indenting standard input. When indenting standard input, write output to standard output.
Revision 1.7 / (download) - annotate - [select for diffs], Tue Aug 25 20:59:37 1998 UTC (24 years, 5 months ago) by ross
Branch: MAIN
Changes since 1.6: +6 -4
lines
Diff to previous 1.6 (colored)
Add { and } to shut up egcs. Reformat the more questionable code.
Revision 1.6 / (download) - annotate - [select for diffs], Sun Oct 19 03:17:17 1997 UTC (25 years, 3 months ago) by lukem
Branch: MAIN
CVS Tags: 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
Changes since 1.5: +1118 -1055
lines
Diff to previous 1.5 (colored)
WARNSify, fix .Nm usage, deprecate register, use <err.h>, KNFify (with indent!;)
Revision 1.5 / (download) - annotate - [select for diffs], Sat Oct 18 16:04:33 1997 UTC (25 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.4: +12 -8
lines
Diff to previous 1.4 (colored)
merge lite-2.
Revision 1.4 / (download) - annotate - [select for diffs], Thu Jan 9 20:20:11 1997 UTC (26 years ago) by tls
Branch: MAIN
Changes since 1.3: +3 -1
lines
Diff to previous 1.3 (colored)
RCS ID police
Revision 1.3 / (download) - annotate - [select for diffs], Tue May 7 18:32:28 1996 UTC (26 years, 9 months ago) by jtc
Branch: MAIN
CVS Tags: netbsd-1-2-base,
netbsd-1-2-RELEASE,
netbsd-1-2-PATCH001,
netbsd-1-2-BETA,
netbsd-1-2
Changes since 1.2: +2 -4
lines
Diff to previous 1.2 (colored)
Include appropriate header files to bring prototypes into scope. Removed explicit errno declarations.
Revision 1.2 / (download) - annotate - [select for diffs], Sun Aug 1 18:14:33 1993 UTC (29 years, 6 months ago) by mycroft
Branch: MAIN
CVS Tags: 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
Changes since 1.1: +2 -1
lines
Diff to previous 1.1 (colored)
Add RCS identifiers.
Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Tue Jun 8 03:22:08 1993 UTC (29 years, 8 months ago) by mrg
Branch: FREEBSD,
CSRG
CVS Tags: lite-2
Changes since 1.1: +6 -6
lines
Diff to previous 1.1 (colored)
4.4BSD-Lite2
Revision 1.1 / (download) - annotate - [select for diffs], Fri Apr 9 12:59:10 1993 UTC (29 years, 9 months ago) by cgd
Branch: 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).