ChangeLog for BLAME
2024-02-06 Thomas E. Dickey

        * change version to "1.4", with patch-date

        * spelling/documentation fixes

        * support $RCS_DIR for compatibility with cm_tools utilities.

        * make test-suite run from the build-directory rather than the
          installed copy of blame.

2024-02-04 Thomas E. Dickey

        * modify top-level makefile to work around pmake's reordering of rules
          (report by Robert Clausecker).

        * fix a build problem with lib/mktime.c on NetBSD i386 (report by
          Robert Clausecker, patch adapted from Paul Eggert change in 2011
          for gnulib).

        * modify configure script to permit building with 64-bit time_t on
          32-bit system.

        * require standard C, e.g., c89 and later for compiler

        * reduce stricter compiler warnings

2024-02-01 Thomas E. Dickey

        * fixes to build/work with MacOS and Solaris 10.

2024-01-30 Thomas E. Dickey

        * build-fixes to work with c11, c23

        * convert m4/getopt.m4 to autoconf-252

        * config.guess: update to 2023-12-02

        * config.sub: update to 2023-12-27

2022-11-13 Thomas E. Dickey

        * configure aclocal.m4 m4/* lib/*: begin conversion to
          autoconf-252, addressing problems both in updating the configure
          script as well as portability of the configure script.

        * lib/ src/ add .c.i rule

2022-11-08 Thomas E. Dickey

        * README: update contact address

        * VERSION: add, to put version information in scriptable form.

        * doc/blame.1: minor cleanup

        * install-sh: update to 2020-11-14.01

        * config.guess: update to 2022-08-01

        * config.sub: update to 2022-08-01

        * config.rpath: delete/obsolete

2022-01-29 Thomas E. Dickey

        * .../ rewrite to eliminate automake

        * .../ delete; some extraneous files such as depcomp are
          retained but unsupported.

2021-02-07 Thomas E. Dickey

        * configure: comment-out the change of CFLAGS to use -O3, to reduce
          breakage in gcc-10's support for inlining.

        * src/blame.c src/lexer.c: linkage-fixes.

        * src/system.h: build-fix for standard C

        * lib/argp-parse.c src/util.c: build-fixes for stricter compiling

        * m4/mktime.m4, configure: shorten the timeout, which was excessive

        * blame.spec: remove unused file

        * lib/argp.h src/blame.c src/date.c: compiler warnings

        * lib/argp-fmtstream.h, lib/argp.h: apply patch from Debian #778101,
          Debian #868970

        * adapt Debian package-scripts for test-builds.

2020-01-25 Thomas E. Dickey

        * update config.guess, config.sub

2006-11-23 Michael Chapman  <>

        * Use mock, not mockbuild

        * Released 1.3.1

2006-11-20 Michael Chapman  <>

        * Fix test when current username is longer than 8 characters.

        * New mockbuild targets -- build against fc4/fc5/fc6.

2006-11-19 Michael Chapman  <>

        * Add disttag.

        * date.c (undefine, date_parse): Fix warnings.

        * system.h (SALLOC): Take the string length without the null-terminator.
        * keyword.c (_keyword_unescape, _keyword_escape): Fix calls to SALLOC.

        * system.h (SREALLOC): New macro.
        * rcs.c (_rcs_find_rev): Use it.

        * config.sub: Added.

        * Resync with gnulib. base_name now returns a newly malloced string.
        * Define GNULIB_ARGP_DISABLE_DIRNAME, because argp leaks
          memory with the new base_name.
        * util.c (does_working_filename_match_rcs_filename,
          find_matching_rcs_filename, find_matching_working_filename): Various
          base_name memory leak cleanups.

        * Use special error code for valgrind errors.
        * (MAC_CHECK_STDERR): Catch valgrind errors.
        *, Remember to check stderr on every failure.

2005-12-02  Michael Chapman  <>

        * Released 1.3

2005-11-18  Michael Chapman  <>

        * keyword.c (_keyword_shrink_output, keyword_annotate): Don't
          explicitly use unlocked IO calls since this is handled by gnulib.
        * keyword.c (keyword_annotate): Use fputs where possible.
        * keyword.c (keyword_annotate): Fix handling of @ symbols within
          $-delimited text ranges.
        * New test.
        * More testdata for new test.

        * Resync with gnulib.
        * Remove gl_* calls that are handled by gnulib

2005-06-30  Michael Chapman  <>

        * keyword.c (_keyword_shrink_output, keyword_annotate): Use unlocked
        * system.h: Include unlocked-io.h.
        * Spelling fix.
        * Released 1.2.

2005-06-29  Michael Chapman  <>

        * blame.c (annotate_revision, annotate, parse_options, main),
, Add fastexit support.
        * blame.c (annotate_revision), date.c (date_sprintf_prefix),
          keyword.c (keyword_annotate): Malloc less often by outputting
          on the fly.

2005-06-28  Michael Chapman  <>

        * src/ (AM_LFLAGS): Add -8.
        * New test.
        * blame.c (annotate_revision): Rework last-line handling.
        * Fix last-line handling testdata.
        * Resync with gnulib.
        * (gl_MODULES): Update list.

2005-06-17  Michael Chapman  <>

        * Don't use substring expansion.
        * Resync with gnulib.
        * (gl_MODULES): Update list.

2004-11-25  Michael Chapman  <>

        * Released 1.1.

2004-11-24  Michael Chapman  <>

        * Said GCC 3.4 bugs weren't actually bugs.
        * Remove function attributes -- they're too dangerous!
        * (%build): Run tests after build.

2004-11-23  Michael Chapman  <>

        * Resync with gnulib...
        * getopt_.h (__need_getopt, __getopt_argv_const),
          getopt.m4 (gl_GETOPT): ... and remove local fixes.
        * tests/blame: Replace ${1+"$@"}, so that Zsh (such as on Mac OS X)
        * keyword.c (keyword_expand): Work around "cast used as lvalue" warning.
        * hash.c (_hash_entry_new): Remove useless assertion.
        * Released 1.0.
        * Rebuild RPM with -mtune=i386 to work around GCC 3.4 bugs.

2004-11-20  Michael Chapman  <>

        * Resync with gnulib...
        * getopt_.h (__need_getopt, __getopt_argv_const),
          getopt.m4 (gl_GETOPT): ... modulo some fixes.
        * (RELEASE): Bump release number.
2004-11-18  Michael Chapman  <>

        * blame.c (parse_options): Fix ordering of options in --help.

2004-11-14  Michael Chapman  <>

        * lines.c (lines_apply): Handle a delta text without an empty last line
          properly. Bug discovered by Bob Proulx <>.
        * Check the bug doesn't happen again.
        * More testdata for new test.

2004-11-11  Michael Chapman  <>

        * Fix duplicated test.

        * Released 0.3.

2004-11-10  Michael Chapman  <>

        * -V output has changed.
        * blame.c (parse_options): Store the correct version in rcs_emulation.
        * date.c (date_parse),
          keyword.c (_keyword_escape, keyword_expand): Emulate old RCS versions.
        * rcs.h (_rcs): Comment prefix in RCS files is now used.
        *, New tests.
        * More testdata for new tests.
        * blame.1: Documentation update.

2004-11-09  Michael Chapman  <>

        * blame.c: Parse -V[VER] and --version[=VER] (but the result is not
          used yet).

2004-11-08  Michael Chapman  <>

        * doc/blame.1: Initial cut of manpage.

2004-11-07  Michael Chapman  <>

        * blame.c (parse_options, main): Use $RCSINIT environment variable.
        *, New tests.
        * Resync with gnulib.

2004-10-23  Michael Chapman  <>

        * blame.c (main): s/TAG/REV/, and make --rev an alias for --revision.

2004-10-22  Michael Chapman  <>

        * (RELEASE): Bump release number.
        * README: Turn "Known Issues" into "Getting Help" -- it didn't describe
          any actual known issues...

2004-10-21  Michael Chapman  <>

        * lexer.l, parser.y: No need for a pure parser.
        * (AC_INIT): Use my Sourceforge email address.
        * Released 0.2.

2004-10-20  Michael Chapman  <>

        * (gl_MODULES): Update list.
        * parser.y (deltatext): Move declaration of delta to top of block.
        * blame.c (annotate), lines.c (lines_append_nocopy),
          system.h (OINIT, OALLOC, _OALLOC, OFREEALL): Use obstacks to allocate
        * blame.c (main): Set program_name from argv[0].

2004-10-19  Michael Chapman  <>

        * Major reworking of memory management. Profiling showed that most time
          was spent in redundant memory movement. By mmapping the file into we
          can form pointers to interesting bits of it, rather than copying the
          interesting bits in the lexer. Using a private mmap means we can
          modify it by strategically placing '\0' characters in it. This also
          means many of the program's data structures no longer need to concern
          themselves with memory management.
        * The algorithm to apply deltas has been modified to be far more
          efficient. The line buffer is memcpy'ed at most once during a single
          lines_apply call. No memory is malloced or freed at all during the
          entire annotation run.
        * Add -fprofile-arcs -ftest-coverage for profiling.
        * src/ (AM_LFLAGS): Add -f.
        * llist.c, llist.h: Removed.
        * Globally replace llist with vector.
        * Scrap vector iterators.
        * vector.c (vector_insert, vector_insert_nocopy, vector_remove):
          Functions not used any more (because of dedicated vector handling
          for line buffers in lines.c).
        * vector.c (vector_append_nocopy), vector.h (vector_append): New
        * blame.c (annotate_revision): Always exit function at the bottom.
        * blame.c (annotate_revision): Copy rev so that it can be modified on
          the fly. Use pointer comparisons rather than string comparisons
          wherever possible.
        * rcs.c (rcs_parse): Mmap the input file and pass the buffer to the
        * delta.c, delta.h: Point to locations in mmapped file rather than
          using duplicates.
        * delta.h (for_each_branch_base): A delta may not have a branch hash.
        * lines.c, lines.h: Almost a complete rewrite. Shrink amount to memcpy
          as much as possible, by reading and writing different line buffers.
          Text is pointers into mmapped file.
        * blame.c (annotate_revision): Use spare line buffer, swapping with
          current buffer after applying each delta.
        * lexer.l: Rework rules to grab as much as possible per yylex call.
        * parser.y: Use pointers into mmapped file.
        * keyword.c (_keyword_append_mem): Handle @@ -> @ conversion here,
          rather than the lexer.
        * blame.c (annotate): When extracting a revision from a working file,
          ensure it is valid.
        * blame.c (parse_options), data.h, hash.c, hash.h: Make NULL/NULL be
          no-op dup and free functions; explicitly use string_dup/string_free
          for the old behaviour.
        *, New tests.
        * More testdata for new tests.
        * Resync with gnulib.

2004-10-08  Michael Chapman  <>

        * system.h (ALLOCA): New macro.
        * blame.c (annotate_revision): Make prefix an auto variable.
        * keyword.c (keyword_extract_revision): Allocate buffer on stack.
        * lines.c (lines_new): Allocate ll on stack.
        * Resync with gnulib.
        * (RELEASE): Bump release number.

2004-09-28  Michael Chapman  <>

        * date.c (date_sprintf), system.h (_UNUSED, _UNUSED_LABEL):
          Split macros up.
        * (RELEASE): Bump release number.
        * date.c (date_parse_rev): Handle old RCS files with dates before year
          2000. Original patch from Mats Kronberg <>.

2004-09-27  Michael Chapman  <>

        * util.c (does_working_filename_match_rcs_filename)
                 (find_matching_rcs_filename, find_matching_working_filename):
          Use the gnulib-supplied base_name.
        * rcs.c (rcs_parse): Call canonicalize_file_name and base_name directly.
        * fs.c, fs.h: Removed -- no longer used.
        * Released 0.1.

2004-09-26  Michael Chapman  <>

        * blame.c (main): Change assignments to argp_program_version and
          argp_program_bug_address to global variable definitions, so that picky
          linkers don't complain about undefined symbols.
        * Replace computing $testdir with an experimental test. This
          automatically resolves ".", ".." and symlinks all at once.
        * *.at: Check that stderr is not empty when it shouldn't be.
        *, New tests.
        * More testdata for new tests.
        * blame.c (annotate_revision),
          date.c (_date_parse_decimal, date_parse_zone, parse_pattern_letter)
          lines.c (lines_apply),
          rcs.c (_isidchar, rcs_rev_is_valid, rcs_branch_is_valid),
          system.h (ISALNUM, ISALPHA, ISDIGIT, ISGRAPH, ISSPACE): Explicitly
          cast argument to all character classification functions, since they're
          macros with a subscript lookup on some platforms.
        * rcs.c (_rcs_get_base, _rcs_find_rev, _rcs_find_rev_before)
                (rcs_resolve_tag): Move error messages deeper down.

2004-09-25  Michael Chapman  <>

        * src/ [GCC] (AM_CFLAGS): More aggressive warnings.
        * blame.c (main): Assign parser.options at run-time, since it's value
          isn't known at compile-time.
        * blame.c (main), date.c: End all struct initializers properly.
        * date.c (parse_pattern_letter): Remove assertion that am and pm differ
          (it generates too much for older CPP implementations). Use AM/PM if
          the locale doesn't have its own values.
        * parser.y (rcstext): Cast count to unsigned when comparing.
        * system.h (UNUSED, PURE, MALLOC, NONNULL, NONNULL_PARAMS): New macros.
        * delta.h (delta_ref_free): Mark delta with UNUSED.
        * parser.y (yyerror): Mark rcs with UNUSED.
        * src/*.h: Mark functions with appropriate attributes.
        * rcs.c (rcs_resolve_tag): Add zone_offset parameter. Use it when
          formatting error messages containing dates.
        * Added expout for tests that should succeed.
        * date.c (date_sprintf): Handle missing tm_gmtoff member.
        * date.c (date_sprintf_prefix): UTC time not local time. I think.
        * m4/langinfo.m4, date.c (_date_parse_decimal): Use RADIXCHAR instead
          of DECIMAL_POINT, if the latter is not found.
        * Make $testdir sed script work on Sparc.
        * <No author>: Build a replacement string for $username
          that's exactly 8 characters long.

2004-09-24  Michael Chapman  <>

        * Normalize $testdir.
        * parser.y (_parser_count_deltalist, rcstext),
          rcs.c (rcs_free, _rcs_get_base, _revcmp, _rcs_find_rev_before)
          rcs.h (rcs_t): Build trunk branches.
, Copy expected output/errors into
          expout/experr rather than using M4 macro.
        * New tests.
        * tests/, tests/blame, tests/,
 (AC_CONFIG_TESTDIR): Provide a way to pass tests through

        * Resync with gnulib.
        * rcs.c (rcs_resolve_tag): Error if a tag is resolved but the date is
          too late.
        * blame.c (parse_options): Error on multiple keyword substitution types.

2004-09-23  Michael Chapman  <>

        * date.c (_date_parse_decimal): Bugfixes.
        *,, Extended tests.
        *,,,, New tests.
        * More testdata for new tests.
        * Use NEWS as the AC_SUBST_FILE variable.
        * Determine directory separator differently.
        * dirsep.m4: Removed.
        * blame.c, system.h, util.c: Use different directory separator.
        * util.c: Fix broken suffix parsing.
        * keyword.c (keyword_expand): Colon should be output only if both key
          and value are to be output.

2004-09-22  Michael Chapman  <>

        * Resync with gnulib.
        * (gl_MODULES): Add getline and setenv.
        * (gl_AC_TYPE_UINTMAX_T): Needed by lib/canonicalize.c.
        * date.c, lexer.l, system.h, working.c: Add #includes for gnulib
        * blame.c (program_name): Needed by lib/error.c.
        * vector.h (vector_t): Use unsigned int rather than u_int32_t.
        * tests/*, tests/testdata/*: Added test directory.
        *,, Added tests.

2004-09-21  Michael Chapman  <>

        * blame.c (annotate_revision): Command-line keyword expansion overrides
          the RCS file's default.
        * parser.y (admin_expand): Free $2 after parsing it.
        * keyword.c (keyword_expand): Add support for Locker keyword.
        * rcs.c rcs.h (rcs_get_locker): Added.
        * fs.c (fs_get_short_name): strdup the return value.
        * Convert ALLOC to CALLOC/MALLOC/SALLOC variants.
        * Resync with gnulib.
        * (gl_LIB): Now defined by gnulib
        * (AC_SYS_LONG_FILE_NAMES): Needed by lib/same.c

2004-09-20  Michael Chapman  <>

        *, Use GCC Automake conditional to control
          whether -Wno-format-y2k is used.
        * keyword.c (_keyword_append_mem): Preallocate 32 extra bytes at a time.
        * More comments!

2004-09-19  Michael Chapman  <>

        * Comments!

2004-09-18  Michael Chapman  <>

        * ChangeLog, NEWS, Added.
        * Use gnulib.

2004-09-04  Michael Chapman  <>

        * Initial lexer/parser for Blame.