2019-08-18  Asher Gordon  <AsDaGo@posteo.net>

	* src/sig2str.c, src/sig2str.h (sig2str): Implement our own
	simplified sig2str() instead of using GNU Coreutils' version which
	is overly complex for our purposes.
	* src/intprops.h: We don't need this anymore.
	* src/main.c (main): Our sig2str() has a different API than
	Coreutils', so change the code that uses it.
	* src/debug.c (debug_abort, dump_core): Likewise.

	* src/parse.c (parse_human_other_nums): Allocate
	`raw_nums' and `remove_nums' on the stack rather than on the
	heap. Note that their sizes are still dynamic even though they're
	on the stack.

2019-08-17  Asher Gordon  <AsDaGo@posteo.net>

	* configure.ac: Use AC_PROG_CC_STDC to check if we need any
	options to support ISO Standard C (C99 at the time of this
	writing). We use features found in C99, so fail if we don't
	support C99 or later.

2019-08-16  Asher Gordon  <AsDaGo@posteo.net>

	* src/parse.c (fill_other_nums): If all the numbers in the square
	are between 1 and the size of the square squared, fill in
	`other_nums' with the missing numbers between 1 and the size
	squared.
	* src/parse.c (parse_human_other_nums): Use fill_other_nums() to
	default to the behavior described above if no other numbers are
	specified explicitly.

	* src/main.c (square_main): Make `-a, --all' set `keep_going' to 1
	as well as setting `skip_trivial' to 0, because it would have no
	effect otherwise.

	* configure.ac: Check for __builtin_unreachable() and define it to
	abort() if we don't have it.

2019-08-15  Asher Gordon  <AsDaGo@posteo.net>

	* src/main.c (square_main): Skip trivial differences by default
	and add option `-a, --all' to revert to previous behavior (don't
	skip trivial differences).
	* src/square.c (square_trivially_equiv): Check if two squares are
	trivially equivalent (they are rotations/reflections of each other
	or they are equivalent).
	* src/square.c: Make `beginning' global because
	square_solve_recursive() needs to use it now.
	* src/square.c (square_solve): If we are skipping trivial
	solutions, allocate a solutions list to pass to
	square_solve_recursive() even if `solutions' is NULL.
	* src/square.c (square_solve_recursive): Skip trivially equivalent
	squares as determined by square_trivially_equiv() if we are
	requested to.

2019-08-13  Asher Gordon  <AsDaGo@posteo.net>

	* src/debug.c [HAVE_PTHREAD]: Create a thread-independent, global
	variable `global_errno' and an accompanying mutex
	`global_errno_mutex'.
	* src/debug.c (square_solve_recursive) [HAVE_PTHREAD]: Set
	`global_errno' on failure so that other threads know that
	something went wrong.
	* src/debug.c (square_solve) [HAVE_PTHREAD]: After calling
	square_solve_recursive(), set `errno' to `global_errno' before
	returning if it failed.

	* src/main.c (square_main, squarec_main): Check for write errors.
	* src/square.c (square_solve, square_solve_recursive): Likewise.
	* src/write.c (write_human): We already check for write errors
	here, EXCEPT when we're writing the description. Check for that
	too.

	* src/write.c (cellval_compare): Compare two `cellval_t's for
	qsort().
	* src/write.c (write_human_other_nums): Sort `nums' with qsort()
	before printing.

2019-08-11  Asher Gordon  <AsDaGo@posteo.net>

	* src/debug.c (dump_core): Offer to dump core and dump it if
	accepted.
	* src/debug.c (debug_abort): Call dump_core() before exiting.

2019-08-09  Asher Gordon  <AsDaGo@posteo.net>

	* src/debug.c (debug_abort) [HAVE_BACKTRACE]: Skip duplicate
	backtrace entries.

2019-08-08  Asher Gordon  <AsDaGo@posteo.net>

	* src/main.c (square_main) [HAVE_PTHREAD]: If number of threads
	was not specified explicitly, try to determine optimum number for
	the current machine.

	* src/debug.c (debug_abort) [HAVE_BACKTRACE]: Print a backtrace
	with the backtrace() family of functions if available.

2019-08-07  Asher Gordon  <AsDaGo@posteo.net>

	* src/square.c (square_solve_recursive) [HAVE_PTHREAD]: If there
	weren't enough resources available to create a new thread, fall
	back to just calling square_solve_recursive() instead of dying.

2019-08-06  Asher Gordon  <AsDaGo@posteo.net>

	* src/main.c (square_main) [HAVE_PTHREAD]: Add `-j, --jobs,
	--threads' option to specify the maximum number of threads we will
	use.

	* src/square.c (square_solve_unpack_args) [HAVE_PTHREAD]: Takes a
	void * argument, which is actually a `struct solve_args *', and
	unpacks it and calls square_solve_recursive() with the unpacked
	arguments. Also does some memory housekeeping.
	* src/square.c (square_solve_new_thread) [HAVE_PTHREAD]: Create a
	new thread with square_solve_unpack_args() as the callback.
	* src/square.c (square_solve, square_solve_recursive)
	[HAVE_PTHREAD]: Implement multi-threading.

2019-08-05  Asher Gordon  <AsDaGo@posteo.net>

	* configure.ac: Check for POSIX Threads with the AX_PTHREAD macro
	and update relevant variables.

2019-08-04  Asher Gordon  <AsDaGo@posteo.net>

	* src/main.c: Add variable `version_string' to store the version
	string (including copyright and distribution notice).
	* src/main.c (square_main, squarec_main): Add option `-v,
	--version' to print version information and a copyright and
	distribution notice.

	* configure.ac: Define standard macro NDEBUG rather than defining
	assert() when assertions should be disabled.
	* src/main.c, src/input.c, src/parse.c, src/square.c: Don't check
	if assert() is defined before including <assert.h> (see above).

	* src/main.c: Rename variables `version_string' and `usage_string'
	to `version_message' and `usage_message' respectively.

	* src/debug.c, src/debug.h (debug_abort): Add function to print a
	debugging message when we detect a bug.
	* src/sig2str.c, src/sig2str.h, src/intprops.h: Steal these from
	GNU Coreutils so we can print a signal's name (e.g. "SIGINT").
	* configure.ac, src/Makefile.am: Compile src/debug.c, src/debug.h,
	src/sig2str.c, src/sig2str.h, and src/intprops.h if debugging
	is enabled.

	* src/main.c (get_format): Don't & `flags' with O_RDONLY since
	O_RDONLY is 0. Instead, & it with O_WRONLY and O_RDWR and if it
	doesn't have either of those, then it's read-only.
	* src/main.c (get_format): Compare `fd' against STDIN_FILENO and
	STDOUT_FILENO rather than comparing `file' against `stdin' and
	`stdout'. That way, "square /dev/stdin" is the same as "square" or
	"square -".

2019-08-03  Asher Gordon  <AsDaGo@posteo.net>

	* src/main.c (squarec_main): Initialize `infile' and `outfile' to
	NULL so it can be determined whether or not they were set.

	* src/main.c (get_format): Use `name' even when `file' is stdin
	(or stdout).
	* src/main.c (get_format): Check whether `file' is stdout rather
	than stdin if the file has the O_WRONLY flag. If it has O_RDONLY,
	check for stdin, and if it has O_RDWR, check for either.

2019-08-01  Asher Gordon  <AsDaGo@posteo.net>

	* src/main.c (square_main): Change `mode' to `format' in help
	message, options, and the variable name.
	* src/main.c (parse_format, get_format): Add functions to parse
	the format ("text" or "binary") and to get the format based on the
	file and its extension.
	* src/main.c (squarec_main): Add options `-o, --output', `-f,
	--format', and `-h, --help'. `-o, --output' specifies the output
	file (input file is the first positional argument or stdin). `-f,
	--format' specifies the format ("text" or "binary") for the file
	(input or output) preceding it. `-h, --help' prints--do I really
	need to tell you?

	* src/main.c (square_main): Change printf() format from %hhd to %d
	when printing getopt_long()'s return code.

	* src/main.c (square_main): Add variable `filename' to store the
	file name.
	* src/main.c (square_main): Make parse error message slightly more
	verbose.

2019-07-31  Asher Gordon  <AsDaGo@posteo.net>

	* src/main.c: Add macros usage() and fusage(file) to print a usage
	string to stdout or a file respectively.
	* src/main.c (square_main): Add a local variable `usage_string' to
	store the usage string.
	* src/main.c (square_main): Print usage string when given wrong
	number of positional arguments.

	* src/main.c (square_main): If not given explicitly, determine the
	file type (text or binary) based on the extension and whether or
	not the file is a tty.

2019-07-21  Asher Gordon  <AsDaGo@posteo.net>

	Initial release 0.1a1.



======================================================================

Copyright (C) 2019  Asher Gordon <AsDaGo@posteo.net>

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.  This file is offered as-is,
without any warranty.
