
				 9/15/2016
				 ---------
[bash-4.4 released]

				   9/17
				   ----
builtins/common.c
	- display_signal_list: if 0 is supplied as an argument to kill -l,
	  display a signal-out-of-range error.  Fixes bug reported by
	  Martijn Dekker <martijn@inlv.org>

				   9/18
				   ----
print_cmd.c
	- print_heredoc_bodies: take a list of redirections, all here documents,
	  and print the here-document bodies including the ending delimiter,
	  followed by a newline
	- print_redirection_list: print the heredoc headers the first time
	  through the list of redirections so we print them in the same left-
	  to-right order they're supplied; print the bodies and delimiters with
	  print_heredoc_bodies after we print all the redirections if we're
	  not printing a list of commands (printing_connection == 0).  Fix for
	  problem reported by Isabella Parakiss <izaberina@gmail.com>
	- print_deferred_heredocs: don't print heredoc headers, since they're
	  now printed in print_redirection_list
	- print_deferred_heredocs: use print_heredoc_bodies

				   9/20
				   ----
builtins/mapfile.def
	- readarray: update usage synopsis to include -d delim.  Report and
	  fix from jhankins@homewood.k12.al.us

test.c
	- test_binop: if op[0] == '-', make sure op[1] != 0 before checking
	  op[2] or op[3].  Fixes out-of-bounds read reported by Franco
	  Costantini <franco.costantini.20@gmail.com>

parse.y
	- cond_term: if yylval.word->word[0] == '-' make sure word[1] != 0
	  before checking word[2] and calling test_unop.  Fixes out-of-bounds
	  read reported by Franco Costantini <franco.costantini.20@gmail.com>
	- make sure to check all instances of the return value of the
	  simple_command production before trying to hook redirections onto it,
	  since it can potentially return NULL.
	  Reported by Franco Costantini <franco.costantini.20@gmail.com>

				   9/21
				   ----
parse.y
	- token_is_assignment: make sure to check that the return value from
	  assignment() finds the `=' we just added at index I to avoid false
	  positives from g=g=g=g=g=g=().  Reported by Franco Costantini
	  <franco.costantini.20@gmail.com>

				   9/22
				   ----
parse.y
	- token_is_assignment: if we're not using the bash malloc (which has
	  guard bytes after the requested allocation size), use a new
	  buffer so we can make sure it's big enough to hold the current
	  token and at least two additional characters.  Reported by
	  Franco Costantini <franco.costantini.20@gmail.com>

				   9/23
				   ----
execute_cmd.c
	- execute_in_subshell: call without_job_control for both job control
	  and non-job-control builds to avoid waiting for last_made_pid
	  inherited from parent shell.  Related to fix from 8/4 to
	  initialize_subshell.  Fixes bug reported by Martijn Dekker
	  <martijn@inlv.org>

builtins/declare.def
	- local_builtin: allow `local --help' to work even when not executing
	  a function. Suggestion from Norm Abramovitz <norm@starkandwayne.com>

				   9/25
				   ----
builtins/printf.def
	- bexpand: if passed a null or empty string, return a newly-allocated
	  empty string (so the return value can always be freed) instead of
	  NULL.
	- printstr: if passed a null string, treat it as if it were an empty
	  string so any precision or fieldwidth arguments are handled
	  correctly.  Report from isabella parakiss <izaberina@gmail.com>

subst.c
	- skip_matched_pair: make the flags argument of 1 affect whether or
	  not backslash can quote characters in the string, so it affects
	  all quoting mechanisms

arrayfunc.c
	- unbind_array_element: now takes a third (flags) argument; flags&1
	  means to not expand an associative array index. This is only called
	  from a shell builtin context, which means the argument should have
	  already undergone word expansion, so it should be ok.  Will still
	  be a problem for uses like "unset -v 'var[$ind]'", quoted to avoid
	  globbing
	- valid_array_reference: pass second flags argument to skipsubscript;
	  still set to 0 by all callers

arrayfunc.h
	- unbind_array_element: updated prototype

builtins/set.def
	- unset_builtin: add third argument of 1 to unbind_array_element calls
	  [TEMPORARILY DISABLED]
	- unset_builtin: call valid_array_reference with second arg of 1 to
	  handle unmatched pairs of quotes and [/]

array.c
	- array_reference: optimize access locality as well as sequential
	  access by adding ability to start from last-accessed element and move
	  backwards or forwards depending on the desired index.  Inspired by
	  report from Tom McCurdy <tom.j.mccurdy@gmail.com> and followup from
	  Christian Franke <Christian.Franke@t-online.de>

variables.c
	- all_array_variables: include associative arrays, not just indexed
	  arrays.  Reported by Grisha Levit <grishalevit@gmail.com>

execute_cmd.c
	- execute_disk_command: if we're optimizing out the fork (CMD_NO_FORK),
	  decrement the shell level so we don't end up incrementing it twice.
	  We should decrement the shell level for an implicit exec like an
	  explicit one.  Reported by Stephane Chazelas
	  <stephane.chazelas@gmail.com>

builtins/exec.def
	- exec_builtin: don't bother to decrement the shell level if we are
	  already in a `(command)' subshell.  Reported by Stephane Chazelas
	  <stephane.chazelas@gmail.com>

lib/readline/macro.c
	- macro_level: count of macro nesting level, maintained by
	  _rl_push_executing_macro and _rl_pop_executing macro
	- _rl_with_macro_input: if current nesting level exceeds
	  MAX_MACRO_LEVEL, abort the current command line with _rl_abort_internal
	  and return to the top level.  Reported by Christian Klomp
	  <christianklomp@gmail.com>

lib/readine/history.c
	- add_history: if allocating the history list for the first time,
	  make sure the max history list size isn't so large that it will
	  cause allocation errors.  Cap it at MAX_HISTORY_INITIAL_SIZE
	  (8192).  Reported by Sean Zha <freeman_cha@hotmail.com>

jobs.c
	- wait_for: if a foreground job with job control enabled is killed by a
	  SIGINT and sourcelevel != 0, act as if we received the SIGINT so the
	  file sourcing can be terminated.  Reported by PePa
	  <peterkelly@passchier.net>

				   9/26
				   ----
subst.c
	- read_comsub: only warn once for null bytes in command substitution
	  output, instead of once for every null byte

arrayfunc.c
	- array_variable_part: now takes a `flags' argument; changed all callers
	  to initially pass 0
	- array_variable_name: now takes a `flags' argument; changed all callers
	  to initially pass 0
	- array_variable_name: pass `flags' argument to skipsubscript instead
	  of just passing 0

arrayfunc.h
	- array_variable_{name,part}: added new argument to prototypes

				   9/29
				   ----
bashline.c
	- bash_directory_completion_hook: don't bother to try and expand a
	  ${ or $( that isn't complete; expand_prompt_string will complain.
	  Fixes reports from John Passaro <john.a.passaro@gmail.com> and
	  Valentin Bajrami <valentin.bajrami@gmail.com>

lib/readline/history.c
	- _hs_append_history_line: use a strategy that attempts to avoid
	  realloc copying memory to a newly-allocated block if the history
	  line we're appending to gets `too long' (currently 256 bytes).
	  We reallocate in powers of 2 starting at 512, and rely on realloc
	  not allocating a new block and copying into it if the size is the
	  same as the last call to realloc.  Addresses issue raised by
	  Hubert Schmid <h.schmid@gmx.de>

trap.h
	- check_signals: new extern declaration
	- trapped_signal_received: new extern declaration

builtins/read.def
	- read_builtin: if one of the zread* functions returns < 0 (which
	  usually only happens in Posix mode), make sure we call check_signals()
	  before eventually calling run_pending_traps() because zread() isn't
	  going to call it
	- include trap.h for correct extern functions and variable declarations

lib/sh/zread.c
	- zread: if executing a builtin, call check_signals_and_traps() for
	  backwards compatibility.  If not, call check_signals() only, because
	  we don't want to run traps during, for instance, reading command
	  substitution output.  Fixes race condition bug reported by Luiz Angelo
	  Daros de Luca <luizluca@gmail.com>

				   9/30
				   ----
subst.c
	- command_substitute: reset parse_and_execute_level to 0 in the child
	  process, since it's independent of the other parse_and_execute
	  calls.  Adds command substitution inside other parse_and_execute
	  calls optimizations to suppress forks, as suggested by
	  Martijn Dekker <martijn@inlv.org>

				   10/3
				   ----
configure.ac
	- SHOBJ_STATUS: make sure it defaults to unsupported and is substituted
	  if the shobj-conf script isn't run.  Fixes `make install' bug with
	  a minimal config reported by Andrew Tomazos <andrewtomazos@gmail.com>

				   10/5
				   ----
support/shobj-conf
	- darwin: set compatibility_version for a shared build of the readline
	  library (the standalone readline distribution shares this file) to
	  $(SHLIB_MAJOR)$(SHLIB_MINOR).  Recommendation from Max Horn
	  <max@quendi.de>

				   10/6
				   ----
array.h
	- array_first_index: new convenience define

array.c
	- ADD_AFTER: new define, complement of ADD_BEFORE
	- UNSET_LASTREF: now takes an array as an argument, prepping for move
	  of lastref pointer into the array struct
	- array_insert: check whether we are adding at the beginning of the
	  array and take a fast path if so
	- array_insert: use same strategy as array_reference to find the place
	  to insert, starting from the last-referenced element and moving
	  forward or back from there; use ADD_AFTER if moving backward
	- array_insert: if replacing an existing element, just replace the
	  value with new->value instead of the entire element
	- array_reference: short-circuit quickly if looking for an element
	  before the first assigned index
	- array_reference: if we don't find the element, leave lastref pointing
	  to the closest element under the assumption we will be assigning or
	  looking for something close
	- array_reference: take advantage of ordered indexes to short-circuit
	  when looking for element that is not set

				   10/7
				   ----
array.c
	- array_remove: short-circuit if asked to remove index after max
	  index or before first index

				   10/10
				   -----
lib/malloc/malloc.c
	- internal_realloc: if we are requesting reallocation to the same size
	  as the block's current size, short-circuit and return `mem' right
	  after doing bounds check
	- internal_realloc: if we are reducing the size of an allocation, and
	  the new size fits in the next lower bin, just keep the same block
	  and adjust the size, so we can avoid some copies

parse.y
	- set_line_mbstate: keep track of the allocated size of
	  shell_input_line_property, only request reallocation if the size
	  increases, but don't let it get too big

				   10/11
				   -----
jobs.c
	- wait_for_background_pids: make sure we wait for pid in
	  last_procsub_child since it's not found in any job -- still needs
	  more work to wait for multiple process substitutions

subst.c
	- process_substitute: if make_child fails, make sure we call
	  restore_pipeline to undo the previous save_pipeline()

				   10/15
				   -----
subst.c
	- process_substitute,command_substitute: leave subshell_level (reflected
	  as $BASH_SUBSHELL) intact for any exit trap instead of decrementing
	  it.  Suggested by Martijn Dekker <martijn@inlv.org>

builtins/evalstring.c
	- optimize_subshell_command: new function, framework for optimizing
	  out forks for command that have already forked and are executing
	  in a subshell. Not used yet

expr.c
	- readtok: if we have a post-increment or post-decrement, and the
	  previous token is not a string, check whether the previous token is
	  a number that results from a pre-increment or pre-decrement, and
	  make that an error.  Report from Conrad Hoffmann <ch@bitfehler.net>

				   10/16
				   -----
aclocal.m4
	- BASH_JOB_CONTROL_MISSING: convert from AC_TRY_RUN to AC_TRY_COMPILE
	  with existing set of preprocessor defines, so it can work when
	  cross-compiling.  Suggested by Felix Janda <felix.janda@posteo.de>

				   10/19
				   -----
variables.c
	- get_bashpid: BASHPID is no longer readonly; assignments to it are
	  just ignored.

doc/{bash.1,bashref.texi}
	- BASHPID: note that assignments are ignored and unsetting BASHPID
	  causes it to lose its special properties

				   10/28
				   -----
builtins/pushd.def
	- popd_builtin: make sure to check the normalized stack offset
	  (i.e., negatives counting back from the end of the stack) is within
	  bounds before trying to free that stack entry.  Report from
	  Fernando Muñoz <fernando@null-life.com>

lib/readline/histfile.c
	- chown: protect calls with HAVE_CHOWN.  Fixes for MinGW{64,32} from
	  J. Peter Mugaas <jpmugaas@suddenlink.net>

lib/readline/colors.c
	- S_ISDIR: add define if missing
	- S_ISUID, S_ISGID, S_ISLNK, S_ISSOCK: don't use unless defined.
	  Fixes for MinGW{64,32} from J. Peter Mugaas <jpmugaas@suddenlink.net>

bashhist.c
	- current_command_line_comment: set to the most recent line in a
	  possibly multi-line command that contains a shell comment; set in
	  maybe_add_history and bash_add_history to either the current
	  command number or -2
	- maybe_add_history: set current_command_line_comment for first line
	  of command
	- bash_add_history: chars_to_add set to "\n" if the current command line
	  is one greater than the previous line containing a comment
	  (current_command_line_comment).  Fixes complaint from back in
	  January, 2016 from Dave Rutherford <dave@evilpettingzoo.com>

array.h
	- lastref: move last-referenced pointer into each array struct, so all
	  arrays can have reference locality

array.c
	- array_create: set lastref element to 0
	- array_copy: if copying the lastref in array a, set the new lastref
	  in the copy to the same element
	- IS_LASTREF, LASTREF_START, LASTREF, INVALIDATE_LASTREF, SET_LASTREF,
	  UNSET_LASTREF: change to use new array `lastref' member

pathexp.c
	- quote_string_for_globbing: if quoting for a regexp, make sure to
	  skip and copy a leading `^' in a bracket expression, and skip and
	  copy a subsequent `]' (after an optional `^'), so that leading
	  bracket doesn't close the bracket expression.  Report from
	  Stephane Chazelas <stephane.chazelas@gmail.com>

				   10/29
				   -----
subst.c
	- extract_delimited_string: add calls to CHECK_STRING_OVERRUN for
	  $( inside $((, nested OPENERs, nested ALT_OPENERs, and backquotes
	- skip_to_delim: add calls to CHECK_STRING_OVERRUN for $(, ${,
	  process substitution
	- extract_dollar_brace_string: add calls to CHECK_STRING_OVERRUN for
	  $(
	- extract_dollar_brace_string: use skipsubscript to skip over the
	  array subscript in ${var[sub]} (non-quoted case uses string_extract,
	  which already uses skipsubscript).  Tagged for bash-5.0

				   10/30
				   -----
variables.c
	- EPOCHSECONDS: new dynamic variable, time in seconds since Unix
	  epoch; assignments are ignored.  Can be used on systems where
	  strftime() doesn't support '%s'
	- EPOCHREALTIME: new dynamic variable, time in seconds since Unix
	  epoch with microsecond granularity

doc/{bash.1,bashref.texi}
	- EPOCHSECONDS documentation
	- EPOCHREALTIME documentation

execute_cmd.c
	- decpoint: moved to locale.c, renamed locale_decpoint; changed callers

{bashintl,externs}.h
	- locale_decpoint: extern declaration or #define if support for
	  localeconv() not there

				   10/31
				   -----
lib/malloc/malloc.c
	- posix_memalign: add new posix-mandated interface

examples/loadables/rm.c
	- rm: minimal loadable builtin, removes files and directories, only
	  handles -r and -f options.  Original from Tim Ruehsen
	  <tim.ruehsen@gmx.de>, heavily rewritten for inclusion as loadable

examples/loadables/Makefile.in
	- rm: add rules to build rm as one of the `other' targets

examples/loadables/stat.c
	- stat: new loadable builtin that takes a filename and loads the info
	  returned by stat(2) into an associative array specified by the -A
	  argument (default STAT)

				   11/1
				   ----
variables.c
	- BASH_ARGV0: new dynamic variable, returns $0 on reference and sets
	  $0 on assignment.  From a suggestion from  Rocky Bernstein <rocky@gnu.org>
	  a few years ago

doc/{bash.1,bashref.texi}
	- BASH_ARGV0: document

				   11/2
				   ----
lib/glob/sm_loop.c
	- parse_collsym: make sure to not return an out-of-bounds read if a
	  collating symbol is unterminated.  Fixes OOB read reported by
	  Jerzy Kramarz <op7ica@gmail.com>
	- brackmatch: after incrementing p, before checking whether it's a
	  character range, check whether *p was NULL before the increment
	  and short-circuit the bracket expression if it is

jobs.c
	- discard_last_procsub_child: new function, safely discards
	  last_procsub_child and sets it to NULL

subst.c
	- process_substitute: call discard_last_procsub_child instead of
	  calling discard_pipeline directly.  Fixes bug reported by
	  Christian Weisgerber <naddy@mips.inka.de>

				   11/3
				   ----
shell.h
	- EX_DISKFALLBACK: new special return status available to builtins;
	  means to attempt to execute a disk command with the same name as
	  the builtin

examples/loadables/rm.c
	- if we see the -i option, return EX_DISKFALLBACK

execute_cmd.c
	- execute_simple_command: if executing a builtin returns EX_DISKFALLBACK,
	  try running execute_disk_command instead 

bashline.c
	- shell_expand_line: use expand_word to expand the readline line
	  buffer, which allows us to pass flags with the word. If a numeric
	  argument is supplied, do not perform quote removal (pass
	  Q_HERE_DOCUMENT since here-doc quoting does the right thing) and
	  do not perform command or process subsitution.  From a suggestion
	  by Dabrien 'Dabe' Murphy <dabe@dabe.com> based on an old bug-bash
	  discussion

subst.c
	- expand_word_internal: note that we have added a quoted IFS char to
	  istring by setting sentinel has_quoted_ifs.  Usually we only add
	  one if we are not going to be performing word splitting, but we
	  will not perform word splitting if there's no expansion, so we need
	  to take care of that case
	- expand_word_internal: when performing final word split, if there are
	  no expansions but has_quoted_ifs is non-zero, call remove_quoted_ifs()
	  to remove any quoted ifs characters we added while processing
	- remove_quoted_ifs: new function, removes CTLESC chars preceding
	  (single-byte) chars in IFS. Used when we are not performing word
	  splitting.  Fixes bug reported by Martijn Dekker <martijn@inlv.org>

				   11/4
				   ----
lib/readline/macro.c
	- _rl_peek_macro_key: return the next character from the current
	  keyboard macro; the next character from the `next' keyboard macro,
	  if there is one, if at the end of the current macro; or 0 to
	  indicate that we are at the end of a keyboard macro sequence

lib/readline/rlprivate.h
	- _rl_peek_macro_key: extern declaration

lib/readline/readline.c
	- _rl_dispatch_subseq: add test for ESC at the end of a keyboard macro,
	  which should cause the keyboard timeout for ESC to kick in.  The
	  previous test didn't run the timeout code if executing from a macro,
	  even if we had read the last character of the macro.  Fixes bug
	  reported by Clark Wang <clarkw@vmware.com>

lib/glob/sm_loop.c
	- GMATCH: allow trailing backslash in pattern to explicitly match a
	  backslash that is the last character in the string.  Bug report from
	  Stephane Chazelas <stephane.chazelas@gmail.com>

				   11/5
				   ----
builtins/common.c
	- display_signal_list: if displaying a signal name corresponding to an
	  exit status > 128, don't display the SIG prefix at all.  Old code
	  made displaying the SIG prefix dependent on JOB_CONTROL define.
	  Report and fix from Martijn Dekker <martijn@inlv.org>

execute_cmd.c
	- execute_subshell_builtin_or_function: call without_job_control even
	  if JOB_CONTROL is not defined. Similar to fix from 9/23.
	  Report from Martijn Dekker <martijn@inlv.org>

execute_cmd.c
	- execute_simple_command: free memory allocated and passed to
	  make_child in the child process if JOB_CONTROL is defined
	- execute_command_internal: free memory allocated and passed to
	  make_child in the child process created to run a () subshell or a
	  compound command within a pipeline if JOB_CONTROL is defined
	- execute_coproc: free memory allocated and passed to make_child in
	  the child process if JOB_CONTROL is defined
	- execute_disk_command: free memory allocated and passed to
	  make_child in the child process if JOB_CONTROL is defined.  This
	  series of fixes is the result of reports from
	  Eduardo A. Bustamante López <dualbus@gmail.com>

				   11/6
				   ----
lib/sh/unicode.c
	- u32toutf16: fix to prevent outputting broken surrogate pairs for
	  Japanese locales (ja_JP.UTF-8) on cygwin (which uses UTF-16 natively).
	  Report and fix from Koichi MURASE <myoga.murase@gmail.com>

builtins/trap.def
	- trap_builtin: if OP is `-' (revert), set the SIGINT signal handler
	  to sigint_sighandler if the shell is interactive and sourcing a
	  file (interactive_shell && sourcelevel) or running a trap
	  (interactive_shell && running_trap) even if it's not currently
	  interactive.  Report from Martijn Dekker <martijn@inlv.org>

builtins/read.def
	- check for and read multibyte characters in all cases, not just when
	  we are reading a specific number of characters, as long as
	  mb_cur_max > 1

subst.c
	- expand_word_internal: some improvements to code that converts istring
	  into a WORD_LIST * to avoid multiple allocations and copies of
	  istring, which is already malloc'ed memory -- reduce number of malloc
	  and free calls

test.c
	- unary_test: make sure if we test -v array[@] or array[*] that we
	  free the return value from array_value

				   11/8
				   ----
expr.c
	- expcond: make sure to set `noeval' before reading tokens depending on
	  the result of the conditional test, since readtok() can evaluate
	  identifiers (and recursively those containing expressions).  Report
	  and fix from Koichi MURASE <myoga.murase@gmail.com>

builtins/evalstring.c
	- should_suppress_fork: make sure to check for traps on EXIT and
	  ERR, since any_signals_trapped() only checks for `real' signals,
	  not the fake shell ones.  Fixes bug reported by Werner Fink
	  <werner@suse.de>
	- optimize_subshell_command: ditto

				   11/9
				   ----
eval.c
	- reader_loop: change so that we don't reset the SIGINT handler every
	  time through the command loop in an interactive shell if the signal
	  is trapped (as the comment noted).  Reported by Report from Martijn
	  Dekker <martijn@inlv.org>

subst.c
	- parameter_brace_{patsub,remove_pattern,transform,casemod}: save and
	  restore this_command_name while temporarily setting it for use in
	  error messages.  Fixes use-after-free error reported by
	  Jerzy Kramarz <op7ica@gmail.com>
	- string_extract_verbatim: make sure when we increment i by 2 due to
	  a CTLESC or CTLESC-CTLNUL that we don't read past the end of the
	  string. This can happen if the string ends with an odd number of
	  CTLESC chars. Fixes oob-read error reported by
	  Jerzy Kramarz <op7ica@gmail.com>

				   11/11
				   -----
configure.ac,aclocal.m4
	- BASH_FUNC_SBRK: make sure sbrk actually works, instead of being just
	  a stub function like on several Linux distributions

lib/malloc/malloc.c
	- malloc_usable_size: return the maximum number of bytes available for
	  a particular memory allocation (size of block allocated for it)

				   11/12
				   -----
configure.ac
	- changes to make --enable-profiling work on Linux (-pg, no static link,
	  no -static in LDFLAGS)

Makefile.in
	- changes to make --enable-profiling work on Linux (take
	  ${PROFILE_FLAGS} out of  BASE_CCFLAGS, add to CCFLAGS instead; add
	  BASE_LDFLAGS define that doesn't include -pg or -static; use
	  BASE_LDFLAGS in LDFLAGS; move ${PROFILE_FLAGS} and ${STATIC_LD} to
	  LDFLAGS)

tests/run-gprof
	- changes to make profiling test suite with gprof work on Linux (set
	  GMON_OUT_PREFIX to handle multiple profiled processes per test;
	  change default filename to gmon.out from bash.gmon; look for
	  gprof output files in ${TMPDIR} instead of /tmp; handle multiple
	  profiling files starting with $GMON_OUT_PREFIX)

locale.c
	- locale_isutf8: use locale_charset() if it's available and nl_langinfo
	  isn't
	- locale_isutf8: add code to parse a locale specification and determine
	  whether the encoding is UTF-8 (or utf8) in the absence of
	  nl_langinfo and locale_charset
	- set_default_locale: make sure to set locale_utf8locale early on
	- locale_utf8locale: set via call to locale_isutf8 wherever LANG,
	  LC_ALL, or LC_CTYPE is set

				   11/13
				   -----
lib/readline/display.c
	- rl_redisplay: handle report of potential integer overflow in
	  horizontal display mode from Mateusz Lenik <mlen@mlen.pl>

lib/sh/mbschr.c
	- mbschr: if in a UTF-8 locale (locale_utf8locale) and we are looking
	  for an ASCII character, use (essentially) strchr as a shortcut

lib/sh/shmbchar.c
	- utf8_{mbstrlen,mblen,mbsmbchar,mbsnlen}: UTF-8-specific replacement
	  functions (should also be able to use utf8_mblen in subst.c:
	  string_extract_verbatim)
	- mbsmbchar: if locale_utf8locale is true, call utf8_mbsmbchar
	- mbsmbchar: in UTF-8 locale, use utf8_mblen instead of mbrlen (not
	  used if earlier shortcut taken)

lib/sh/unicode.c
	- u32cconv: don't use nl_langinfo early to call u32toutf8()
	- u32cconv: use locale_utf8locale to set utf8locale
	- u32cconv: when initializing (u32init == 0), use locale_charset, then
	  nl_langinfo, then stub_charset to determine the charset
	- u32cconv: even if we don't have iconv, if locale_utf8locale is non-
	  zero, return u32toutf8

				   11/15
				   -----
lib/readline/nls.c
	- _rl_init_locale: new function, split off code that determines current
	  locale from _rl_init_eightbit, use it to set _rl_utf8locale

lib/readiline/rlprivate.h
	- _rl_init_locale: new extern declaration

lib/readline/readline.c
	- rl_initialize: if not initializing everything the first time, call
	  _rl_init_locale to check current locale and set _rl_utf8locale

lib/readline/text.c
	- _rl_insert_char: optimize cases where we are inserting a single-byte
	  character in a locale with multibyte characters
	- _rl_insert_char: check whether character is single byte if we know
	  we are in a UTF-8 locale, optimize single-byte case to avoid calls
	  to mbrtowc and memmove/memcpy

lib/readline/mbutil.c
	- _rl_char_value: if we are in a UTF-8 locale (_rl_utf8locale) and the
	  current character does not have the eighth bit set ((c & 0x80) == 0),
	  return that char without bothering to call mbrtowc
	- _rl_adjust_point: don't bother calling mbrlen if we are in a UTF-8
	  locale and the current character is not a multibyte character
	- _rl_find_next_mbchar_internal: if we are in a UTF-8 locale, use that
	  to avoid calls to mbrtowc

lib/readline/display.c
	- _rl_col_width: if in a UTF-8 locale, take advantage of that to avoid
	  calls to mbrlen and mbrtowc
	- rl_redisplay: if in a UTF-8 locale, take advantage of that to avoid
	  calls to mbrtowc

				   11/17
				   -----
lib/readline/histlib.h
	- PATTERN_SEARCH: new flag for history search interfaces, means to
	  search for a pattern as Posix specifies

lib/readline/histsearch.c
	- history_search_internal: now takes a `flags' argument instead of just
	  an `anchored' argument to accommodate PATTERN_SEARCH
	- _hs_history_patsearch: new internal interface to use when flags
	  specify PATTERN_SEARCH

lib/readline/rlprivate.h
	- SF_PATTERN: new flag for non-incremental search contexts, means to
	  treat search string as a pattern (maps to PATTERN_SEARCH)

lib/readline/search.c
	- noninc_dosearch: takes an additional `flags' argument for SF_PATTERN
	- noninc_search_from_pos: takes an additional `flags' argument for
	  SF_PATTERN
	- noninc_dosearch: pass flags argument through to noninc_search_from_pos
	- _rl_nsearch_init: if we are in vi command mode, and `pchar' (key used
	  to invoke the search) is `?' or `/', add SF_PATTERN to the flags
	  to conform to Posix spec for vi-mode editing
	- _rl_nsearch_dosearch: if cxt->sflags indicates that we should do a
	  pattern search, pass SF_PATTERN to noninc_search_from_pos
	- rl_noninc_forward_search_again: if in vi command mode and key == `N',
	  make sure flags arg passed to noninc_dosearch includes SF_PATTERN
	- rl_noninc_reverse_search_again: if in vi command mode and key == `n',
	  make sure flags arg passed to noninc_dosearch includes SF_PATTERN
	- rl_history_search_internal: pass extra flags arg to noninc_search_from_pos

				   11/18
				   -----
lib/readline/search.c
	- noninc_search_from_pos: takes a new argument, a pointer to int where
	  it stores the offset of the match in the history line (if non-NULL),
	  modified callers
	- rl_history_search_internal: pass newcol pointer to
	  noninc_search_from_pos to avoid having to recompute the match offset
	  in the matching history entry

config.h.in
	- define HAVE_FNMATCH if we have the fnmatch function (configure was
	  already checking for it)

lib/readline/histsearch.c
	- _hs_history_patsearch: transform the pattern into one ending in a
	  `*' to avoid having to perform multiple match attempts from each
	  index in the history line
	- history_search_internal: changes to handle pattern matching if
	  PATTERN_SEARCH is in the flags and HAVE_FNMATCH is defined.  This
	  makes vi-mode history searching treat the user-specified search
	  string as an fnmatch pattern, as Posix requires.  Fixes issue
	  reported by <jwdevel@gmail.com>

				   11/19
				   -----
builtins/shopt.def
	- shopt_enable_hostname_completion: only declare this if READLINE
	  defined, since that's the only time it's used.  Reported by
	  isabella parakiss <izaberina@gmail.com>

				   11/20
				   -----
builtins/common.c
	- display_signal_list: make `kill -l 0' print `EXIT', modifying change
	  from 9/17

				   11/21
				   -----
subst.c
	- expand_word_internal: when the shell encounters a backslash as the
	  last character of the string, don't try to add a '\'0' to the end
	  of the string if the string is quoted, just add a <CTLESC><\> and
	  skip to the end of string processing.  Fixes oob-read error
	  reported by Jerzy Kramarz <op7ica@gmail.com>

test.c
	- two_arguments: check argv[pos][1] before checking argv[pos][2] when
	  looking for a unary argument.  Fixes oob-read error on single `-'
	  in unary operator position reported by Jerzy Kramarz
	  <op7ica@gmail.com>
	- ANDOR: check s[1] before checking s[2] in case s[1] == end of string.
	  Fixes oob-read error reported by Jerzy Kramarz <op7ica@gmail.com>

subst.c
	- command_substitute: now takes additional flags argument, changed one
	  caller (param_expand) to pass through PF_ASSIGNRHS flag; other callers
	  pass 0
	- command_substitute: pass through flags argument to read_comsub
	- read_comsub: now takes additional new flags argument to indicate
	  whether or not the word is in a context where word splitting will
	  eventually be performed
	- read_comsub: if we are running in a context where word splitting
	  will not take place (PF_ASSIGNRHS), we read a CTLESC, and CTLESC is
	  in $IFS, add a CTLESC to make sure it gets through a round of
	  dequoting

				   11/23
				   -----
parse.y
	- xparse_dolparen: since reset_parser frees the pushed string list,
	  and this is supposed to be a separate parsing context, we need to
	  save and restore pushed_string_list around the call to parse_string
	  and reset_parser.  Fixes bug reported by Dan Douglas
	  <ormaaj@gmail.com>

bashhist.h
	- HISTEXPAND_DEFAULT: default value of history_expansion, moved here
	  from flags.c

flags.[ch]
	- histexp_flag: new variable, this is what set -H/set -o histexpand
	  sets; history_expansion set to value of this variable; defaults to 0
	- history_expansion: now set to HISTEXPAND_DEFAULT

bashhist.c
	- bash_history_reinit: if interact == 0, set history_expansion to the
	  value of histexp_flag, to allow -H option to enable history
	  expansion
	- bash_history_reinit: if interact == 0, make sure
	  history_expansion_inhibited is set opposite of histexp_flag, so
	  enabling history expansion with -H invocation option turns off
	  inhibited expansion. If interactive shell, we turn it off so
	  history_expansion controls whether or not history expansion takes
	  place. In practice, this function is always called with interact == 0,
	  and -c command still doesn't perform history expansion

shell.c
	- init_interactive: make sure histexp_flag and history_expansion are
	  identical in an interactive shell; allows both -H/+H option and
	  default compilation options (HISTEXPAND_DEFAULT) to work

				   11/24
				   -----
subst.c
	- get_word_from_string: take advantage of the fact that SEPARATORS is
	  always a (possibly local) copy of IFS, so build a local charmap of
	  separators and use it instead of the (cached and possibly stale)
	  ifs_cmap map and isifs macro.  Fixes bug with -N stripping leading
	  whitespace reported by Clark Wang <clarkw@vmware.com>

				   11/25
				   -----
builtins/read.def
	- read_builtin: make `i' volatile, since auto variables are technically
	  undefined after a longjmp, and a timeout on SIGALRM causes one.
	  Fix suggested by Dmitry Goncharov <dgoncharov@users.sf.net>

				   11/27
				   -----
parse.y
	- shell_getc: if we are reading input from a string, and we get the
	  ending '\0', and we are not expanding an alias, return EOF right
	  away.  It might be an eval'ed string that has a syntax error.
	  Fixes bug reported by Dan Douglas <ormaaj@gmail.com>

				   11/28
				   -----
subst.c
	- expand_word_internal: if we're expanding a quoted string containing
	  a tilde as the first character of a word, only expand the tilde if
	  we're expanding an array subscript (Q_ARRAYSUB), not if we're
	  expanding any arithmetic expression (Q_ARITH).  This fixes a
	  backwards compatibility issue with expressions like ~0 reported by
	  Bize Ma <binaryzebra@gmail.com>

subst.c
	- parameter_brace_expand_indir: if the variable is not special and
	  the indirect variable is unset (!variable where variable is unset),
	  report an error.  This is a slight incompatibility with previous
	  versions, which did not differentiate between indirecting an unset
	  variable and an indirect expansion resulting in an unset variable.
	  Fixes omission reported by otenba@protonmail.com

				   11/30
				   -----
lib/readline/doc/{rluser.texi,readline.3},doc/bash.1
	- do-uppercase-version: since this doesn't actually exist, replace it
	  with do-lowercase-version, with the caveat that do-lowercase-version
	  results in undefined behavior if bound to a character that's
	  already lowercase.  Suggested by Branden Robinson
	  <g.branden.robinson@gmail.com>

lib/readline/doc/rluser.texi
	- history-substring-search-forward: was misspelled as "substr-search";
	  ditto for search-backward

doc/bash.1
	- history-substring-search-{backward,forward}: add documentation, text
	  straight from readline.3

jobs.c
	- initialize_job_control: if the terminal's process group is valid,
	  but the shell is not the foreground process, check for terminating
	  signals (like SIGHUP, which the kernel would send if the process
	  group were orphaned) during the loop where we try to stop the shell
	  if it's not in the foreground.  Not a perfect solution; the kernel
	  might not send SIGHUP

				   12/1
				   ----
jobs.c
	- initialize_job_control: only go through the SIGTTIN loop 16 times at
	  most before deciding we're in the background and probably a member of
	  an orphaned process group; set original_pgrp to the terminal's pgrp
	  (so the eventual give_terminal_to doesn't leave the terminal in the
	  wrong pgrp); and bail on job control initialization

tests/run-all
	- unset SHELLOPTS to avoid its options `polluting' the test
	  environment.  Suggestion from Vladimir Marek
	  <Vladimir.Marek@oracle.com>

tests/execscript
	- use $PWD/exec8.sub to protect against someone who has a cd command
	  in his bashrc.  Report from  Vladimir Marek
	  <Vladimir.Marek@oracle.com> 

				   12/2
				   ----
shell.c
	- open_shell_script: call end_job_control before exiting the shell in
	  case we were run as `bash -i script' and there is a problem with
	  executing `script'.  If we don't, the terminal ends up in the wrong
	  process group.  Fix from Clark Wang <clarkw@vmware.com>

				   12/3
				   ----
parse.y
	- read_comsub: if we look for a character following a `<' and it's
	  not `<' (indicating that we don't have to read a here-document),
	  make sure we push that character back and go through the loop again
	  so we note the right word start location.  Fixes bug reported by
	  parasite parasite <42parasite@gmail.com>

subst.c
	- parameter_brace_expand_indir: clean up checks for unset variables to
	  minimize incompatibilities with previous versions

				   12/5
				   ----
lib/readline/history.c
	- add_history: don't update history_length until all of the updates to
	  the_history are complete, so history_length is always consistent.
	  Report and fix from Hong Cho <hong.cho@citrix.com>

bashline.c
	- bash_backward_shellword: fix to work better at the end of the line,
	  with multiple trailing whitespace characters.  Inspired by report
	  from Kirill Timofeev <kt97679@gmail.com>

Makefile.in
	- bashbug: use `^' as the sed delimiter instead of `%'; some compilers
	  use `%' in CFLAGS.  Report from  Vladimir Marek
	  <Vladimir.Marek@oracle.com> 

				   12/6
				   ----
test.c
	- test_unop: make sure op[1] != 0 before testing op[2]
	- term: make sure argv[pos][1] != 0 before testing argv[pos][2].  Fixes
	  oob-read reported by Jerzy Kramarz <op7ica@gmail.com>

				   12/7
				   ----
lib/glob/glob.c
	- glob_filename: assign the return value of realloc (results, ...) to
	  a temp pointer, so if realloc returns NULL, we make sure we free
	  results.  Report from Kirill Timofeev <kt97679@gmail.com>

				   12/12
				   -----
lib/sh/shquote.c
	- sh_backslash_quote: if FLAGS&2, backslash-quote other single-byte
	  characters that are in the current locale's <blank> character class

builtins/printf.def
	- printf_builtin: when processing the `%q' format, make sure to
	  backslash quote all <blank> characters by making sure that FLAGS
	  passed to sh_backslash_quote includes 2.  Fixes issue for certain
	  iso-8859-1 locales where character 160 (octal 240, hex 0xa0) is a
	  non-breaking space. Report from Stephane Chazelas
	  <stephane.chazelas@gmail.com>

lib/sh/eaccess.c
	- sh_stat: if DEV_FD_STAT_BROKEN is defined, take /dev/fd/N and turn
	  it into a stat on file descriptor N, as if /dev/fd were not
	  available.  This is the case on some old versions of SunOS.  Report
	  and patch from Dmitry Goncharov <dgoncharov@users.sf.net>

config.h.in
	- DEV_FD_STAT_BROKEN: add define

configure.ac
	- --enable-dev-fd-stat-broken: new command-line option, defines
	  DEV_FD_STAT_BROKEN if supplied at configure time

doc/bashref.texi
	- --enable-dev-fd-stat-broken: document new command-line option for
	  configure
