284179 Commits

Author SHA1 Message Date
mrg
2cdfae77ba save the return value of fdtbus_clock_enable() so we can both
report it correctly instead of always 0, and also return failure
to the caller.
2020-12-31 06:44:11 +00:00
rillig
2d213f3153 make(1): move detailed comment to ForSubstBody 2020-12-31 04:38:55 +00:00
rillig
3d3af52337 make(1): extract ForSubstBody from ForReadMore
This leaves ForReadMore with the single responsibility of interfacing
with ReadMoreProc in Parse_SetInput.
2020-12-31 04:31:36 +00:00
ginsbach
1008587cd2 PR/55891 supress displaying separator when numbers supressed
Fix based on patch provided by Kobayashi Takashi. This brings nl(1) further
in to POSIX compliance. Verified behavior with classic SysV nl(1) and GNU
nl(1). There could still be edge cases here not specified by POSIX.
2020-12-31 04:07:37 +00:00
rillig
99d6ebe6e9 make(1): rename ech to endc
Focusing on the "end" is more important than on the data type "ch".
2020-12-31 03:49:36 +00:00
rillig
492172e6c9 make(1): inline variable in ForReadMore
This variable was intended to help the compilers produce efficient code
by avoiding a duplicate memory read.  As it turned out, GCC 5.5 doesn't
need this help, and probably newer compilers don't need it either.  Well
done, GCC, keeping track of the memory locations even if the pointer to
it changes in the middle.
2020-12-31 03:33:10 +00:00
rillig
4f94a06e63 make(1): clean up ForReadMore
After the previous clean up in for.c 1.123 from 2020-12-30, GCC 5.5 did
not inline the function SubstVarLong anymore since it was now called
from 2 places.  GCC didn't notice that the function call was essentially
the same since in differed only in the end character.

By combining the cases for ${V} and $(V), the code becomes even shorter
than before, while still being understandable.
2020-12-31 03:19:00 +00:00
rillig
f759c16ed9 make(1): simplify termination condition for .for loop
At this point, the number of iteration items is always a multiple of the
number of iteration variables, which makes any addition more complicated
than absolutely necessary.
2020-12-31 03:10:29 +00:00
rillig
d81f96abfb make(1): add test for error handling and expansion in .for loops 2020-12-31 03:05:12 +00:00
uwe
0f21cae337 enet(4): fix refactoring accident. Spotted by mrg@. 2020-12-31 02:16:14 +00:00
rillig
4c09bc6956 make(1): add test for .endfor without corresponding .for 2020-12-30 14:50:08 +00:00
rillig
b64e9d2c70 make(1): improve .for loop documentation, clean up ForReadMore
The comma expression in ForReadMore may be a nice trick, but it's not as
easy to read as a simple if-then-else chain.  Test for '{' before '('
since BSD makefiles use braces by convention.
2020-12-30 14:28:32 +00:00
rillig
e7d2b415e5 lint: remove a bit of redundancy from the test suite 2020-12-30 13:42:19 +00:00
rillig
dbb39b4651 lint: document purpose of the test d_struct_init_nested 2020-12-30 13:41:27 +00:00
rillig
0197fc8fc4 lint: split cluparg into separate functions
That function did more than its short name could express, and the things
it did were not related in any way.
2020-12-30 13:17:42 +00:00
rillig
f4b4e8b893 lint: add test for old style function arguments 2020-12-30 13:15:07 +00:00
rillig
47bf7e655e lint: replace LERROR with lint_assert
This removes the redundancy of mentioning the function name in the error
message.  This redundancy had been correct in all but 2 cases:
build_real_imag and tsize.
2020-12-30 12:22:51 +00:00
rillig
6bddcb2931 lint: spell check comments 2020-12-30 11:56:10 +00:00
rillig
9db9468642 lint: fix Clang-tidy warning about narrowing conversion 2020-12-30 11:47:15 +00:00
rillig
9ec3ffac74 lint: remove unused macro STRBLEN 2020-12-30 11:43:13 +00:00
rillig
ea78491f30 lint: inline STRUCT_ASSIGN
This had only been necessary for some pre-C90 compilers.
2020-12-30 11:39:55 +00:00
rillig
3bd4b094fc lint: un-abbreviate s_dpos, s_spos and s_upos 2020-12-30 11:14:03 +00:00
rillig
eb502cf640 lint: un-abbreviate s_field, s_keyw and s_xsym 2020-12-30 11:04:48 +00:00
rillig
a2826784dd lint: un-abbreviate parenthesized and _strg 2020-12-30 10:56:51 +00:00
rillig
873deaeeb7 lint: rename remaining _nxt members to _next 2020-12-30 10:49:10 +00:00
rillig
c5b43f746f lint: rename more _nxt members to _next 2020-12-30 10:46:11 +00:00
rillig
a2cbddd569 lint: rename symt_t constants
There's no need to abbreviate them, furthermore FMOS was imprecise.
2020-12-30 10:35:38 +00:00
rillig
95c0030060 lint: rename s_nxt to s_next 2020-12-30 10:26:12 +00:00
rillig
b754dcb0cc make(1): format multi-line comments 2020-12-30 10:03:16 +00:00
rillig
106bafb2f3 lint: reduce nesting of function calls 2020-12-30 01:44:32 +00:00
ginsbach
05e6749c39 nl: fix -d delim parsing for POSIX
POSIX specifies it is possible to specify a one delimiter character.
Fix the logic so that both one and two character delimiters are accepted.
2020-12-30 01:42:31 +00:00
rillig
64e104d6f9 lint: reduce verbosity of assertions
Having 2 lines of source code per assertion is too much, especially
since most of this code is redundant anyway.  Extract the common code
and the additional negation into a simple function instead.
2020-12-30 01:33:30 +00:00
rillig
85b03529a9 lint: add debug logging to the parser
Even with -DDEBUG and -DYYDEBUG, the debug output is not detailed enough
to clearly see what happens.

Add some custom debug logging to the parser, mainly for demonstration
purposes, and also to find out how to fix the test d_struct_init_nested.
2020-12-30 01:02:38 +00:00
rillig
dcab0392c7 lint: rename istk_t.i_cnt to i_remaining 2020-12-29 23:12:48 +00:00
rillig
8ed5e02447 lint: rename functions that had very short names 2020-12-29 23:04:31 +00:00
chs
4af96c872b Honor LOCKPARENT for ".." of the root directory.
Reported-by: syzbot+f40b9f241b818fd12198@syzkaller.appspotmail.com
2020-12-29 22:13:40 +00:00
rillig
a5a7f2dbca lint: fix typo in comments 2020-12-29 21:32:46 +00:00
rillig
1af901126c lint: untangle conditions in initstack_next_nobrace 2020-12-29 20:56:28 +00:00
rillig
243e03680f lint: clean up debug logging for initializations 2020-12-29 20:07:04 +00:00
rillig
447de2e185 lint: make debug output for initializations more uniform 2020-12-29 19:57:44 +00:00
rillig
ca73041003 lint: remove redundant function prototypes 2020-12-29 19:09:53 +00:00
rillig
351a1350bb lint: improve debug output for initializing structs
Still trying to find out where the wrong warning in d_struct_init_nested
comes from.
2020-12-29 19:02:16 +00:00
martin
5662516c24 Add /var/db/obsolete/xdebug 2020-12-29 17:53:08 +00:00
rillig
374913ae51 lint: split complete_tag into separate functions 2020-12-29 17:29:31 +00:00
tsutsui
4a35619532 Make local functions static. 2020-12-29 17:17:14 +00:00
thorpej
1bc49641d7 From the Infinitesimal Optimizations Department: in pmap_kremove(), update
the globally visible stats outside of the loop.
2020-12-29 17:16:15 +00:00
rillig
eaac8d6f4d lint: split initstack_next into separate functions 2020-12-29 16:59:12 +00:00
rillig
1d9b6c3dda lint: split initstack_pop into separate functions 2020-12-29 16:53:36 +00:00
rillig
312ed535ca lint: rename functions for handling the initialization stack 2020-12-29 16:48:53 +00:00
martin
80e3db0075 If MKX11 and MKDEBUG, add the xdebug set to the obsolete file handling. 2020-12-29 16:46:44 +00:00