Ensure isalnum() argument is within the range of unsigned char
Otherwise, this is undefined behavior.
Implement load average option
tool: Fail on first unknown target in commands and graph tools
This matches ninja behavior and is a bit simpler.
tool: Order functions according to tool list
tool: Remove list tool
The tools are documented in the manual, so no need to duplicate
that information in a command.
tool: Implement graph tool
manual: Use Pq macro to parenthesize link.
log: Use fgets instead of getline
manual: Update list of supported commands
Add micro version number to --version output
Some projects, such as qtwebengine, parse the output of --version,
and are tripped up by a version string with only two components.
scan: Allow stray indented but otherwise empty lines
This is not very common, but ninja accepts this and it has shown
up in at least one project.
env: Fix const-ness of cycle sentinel
The intent was to make the pointer itself const so that it could
be added to the read-only data section.
Drop now-unused outer evalstring structure
env: Use sentinel in tree node to detect cycles
This allows us to make evalstring a plain linked list and drop the
outer structure. Additionally, we can now distinguish between empty
and unset rule bindings when evaluating an edge variable.
scan: Use an array instead of linked list for path list
parse: Check for non-empty command/rspfile/rspfile_content
This matches ninja behavior and prevents the possibility of a rule
with an empty (NULL) command string.
build: Return early when there is no work to do
Otherwise, we have ntotal=0 when we call formatstatus() to verify
that NINJA_STATUS is valid, causing a SIGFPE if it contains %p.
build: Simplify "nothing to do" condition
If there are no jobs scheduled, then there are no non-phony jobs
tool: Remove now unnecessary check for description