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.
