These definitions have originally been added in arch.c 1.27 on
1998-05-21. Even back then they had been unused, at least they had not
been used directly. Since macros are expanded at their use site, there
could have been an indirect use, but that is not the case anymore.
It's no wonder that nobody is using the archive handling of make. The
archives created by GNU binutils cannot be processed using make since the
format of the archive names has changed. GNU binutils appends a slash to
the member names. Support that format from now on.
Add more debugging output in ArchFindMember. Since nobody uses this part
of make, it doesn't hurt that the debug output is now very verbose.
In Arch_Touch and Arch_TouchLib, move the snprintf to where it belongs.
There's no point modifying a local variable just to throw it away
afterwards.
Comparing a string to a space-padded string is complicated enough to be
extracted to a separate function.
The behavior changes a little bit. Before, when searching for an archive
member with a short name (one that is space-padded in the archive), that
member was not searched using the AR_EFMT1 archive format. This doesn't
matter in practice though since no regular archive member has a name
starting with "#1/".
* Replace character literal 0 with '\0'.
* Replace pointer literal 0 with NULL.
* Remove redundant parentheses.
* Parentheses in multi-line conditions are not redundant at the
beginning of a line.
* Replace a few !ptr with ptr == NULL.
* Replace a few ptr with ptr != NULL.
* Replace (expr & mask) == 0 with !(expr & mask).
* Remove redundant braces for blocks in cases where the generated code
stays the same. (Assertions further down in the code would get
different line numbers.)
* Rename parameters in CondParser_String to reflect the data flow.
* Replace #ifdef notdef with #if 0.
The generated code stays exactly the same, at least with GCC 5.5.0 on
NetBSD 8.0 amd64 using the default configuration.
It was too confusing to have a function named die that doesn't actually
die. Plus, the return type int didn't give any clue about what the
function actually returns.
The wrong negation had been added in main.c 1.414 from 2020-10-31.
Found by GCC 10, which complained about a potential null pointer
dereference in line 2188.
When make is compiled with -DUSE_UCHAR_BOOLEAN, these tests failed.
Merge duplicate code and don't depend on the actual value of TRUE when
evaluating conditions.