many undocumented changes up to this point.  Sorry.

20030902	mem	mml-in: add in_bolF and in_eolF to keep track of
			  beginning- and end- of line states.

20031221	mem	mml-iopf: add getbtrec() and getbtreca() functions
			  and definitions.

20031224	mem	mml-in: change in_charback to take an int rather
			  than char.  If passed an EOF, treat it as a
			  no-op (so caller can get and pushback a char
			  without worry).  Give error if empty stream.

20031228	mem	mml-str: add strmatch_ routines (migrated from
			  mvmf).  Include regex.h in mml-str.h (a
			  precedent of including system header files
			  in mml header files).

20031231	mem	Stuff from compiling on a freebsd system:
			  #include <sys/types.h> in mml-str.h;
			  instead of #ifdef __bsdi__ mml-ttio.unx,
				use #ifdef UNIX_BSD;
			  Add MML_OLD_RESOLV constant in mml.h;
			  Compatibility definitions for old resolver
			    in mml-dns.h based on MML_OLD_RESOLV
			  Per precedent 20031228, include various
			    system header files in mml-dns.h

20040120	mem	Bugfix in strmatch_wild: a missing "else" in
			  the end-of-strings test (could return a false
			  positive in some cases, especially in recursive
			  cases when expanding a '*').  The 'else'
			  was obviously intended but omitted.

20040126	mem	Change some time types from long to time_t

20040303	mem	Change bstr_dup so that:
			 - it copies the string buffer directly, rather
			   than invoking bstr_putb byte-byte-byte;
			 - it copies an extra byte so that any termination
			   byte is preserved.

20040308	mem	Change mml-ll so that each LL_NODE has a pointer
			  to the LL_HEAD header.
			Change ll_rem() so that the hdrP is no longer
			  passed: only the nodeP is passed since each
			  node now identifies its list head.  (I wouldn't
			  do this if anybody else was using this stuff.)

20040311	mem	Add REFSTRs and various refstr_ functions.

20040312	mem	Add encapsulated strings (ESTR) and estr_xxx
			  functions; reimplement older str_xxx functions
			  in terms of the estr_xxx ones.  ESTRs add
			  generality at the cost of overhead.

20040313	mem	Add newstr_n() function.

20040325	mem	bugfix: ll_rem didn't update the tail pointer
			  when removing the last node.  Make it do so.

20040326	mem	mml-iopf: add getlinec() and gettbtrecc()

20040401	mem	bugfix: refstr_new didn't initialize the
			  REFSTR_BASE base structure properly (particulary
			  the linked list header).  Stupid.  Fix.

20040406	mem	Some more work on returning the submatches
			  in estr_match_wild() via match_keep().  This
			  is still not exactly right since submatches
			  may be kept even if the entire match failed.
			  Do we really want to optimize that out?

20040419	mem	bugfix: refstr_ref is supposed to use offsets
			  relative to the base REFSTR; it was using
			  the passed offsets without translating them.

20040804	mem	bugfix: in mml-str.h, macros estr_nextx and
			  estr_bytex had a comparison between a byte
			  and NULL.  NULL should have been NUL.
			  (Caught by compiler warning on a Linux
			  system.)

20040805	mem	Replace the $(.OODATE) Makefile construct with $(?)
			  which seems to be more universally supported.  Per
			  Peter Haag.

20041003	mem	Add "cfile" (counted file) input stream type
			  and handlers, and functions
			  in_stream_push_cfile, in_getc_cfile.  This
			  stream type inputs from a file up to a
			  specified number of bytes.  Useful for
			  reading a section from the middle of a file.

20041004	mem	Add record termination condition TXR_END_FULL,
			  to terminate the reading of a record if the
			  buffer is full (rather than discarding characters
			  beyond the end).

20041018	mem	Add LDDEBUG to the Makefile

20041109	mem	Bugfix: (mml-dns.c) for MX record, mdns_ans_set()
			  was returning the MX name at answer buffer +2
			  instead of at answer buffer.  This is a result of
			  an incomplete prior edit; in an early form we
			  returned the preference in the first two bytes and
			  the string in the remaining bytes, it was changed
			  (badly) to return the preference in the dn_val1
			  location and the string in the answer buffer.
			  Fixed now..
			  
20041230	mem	Incorporate the "new bsd" license, which is slightly
			  more open, and more what I intended anyway, than
			  the old "take it and use it" terms.

20041230	mem	Some minor cosmetic changes.

20041230	mem	Finally update mml-err.c to use varargs.  Never
			  got around to it because mml-err mainly exists
			  to provide default error() and warning()
			  functions and I generally supersede them in
			  whatever links this in.

20050211	mem	In what seems like continuing quest to add layers,
			  or at least to use MML_IN streams, all
			  mml-iopf functions that perform input from
			  files have been forked into different versions
			  that take characters from different sorts of
			  input.  Now the various getxxx() functions
			  have been renamed with single-letter prefixes;
			     fgetxxx() to input from a FILE;
			     igetxxx() to input from a MML_IN stream.
			  igetxxx() is the fundamental layer, and
			  fgetxxx() uses that layer.
			The idea is not to proliferate new functions, but
			  to make more MML_IN stuff available while not
			  abandoning application code that uses FILE
			  access stuff.

20050211	mem	Bugfix: the mml-in stream pushback character
			  (is_pbc) was defined as a char (a byte), which
			  was compared to NUL to see if there was a
			  character pushed back.  This was because the
			  whole stream stuff was originally put in place
			  to deal with NUL-terminated C style strings.
			  I've added a lot of other kinds of things
			  since then, but never updated the pushback
			  logic.  Change is_pbc to be an int, which is -1
			  to represent no character, so that it's now
			  possible to push back a NUL character.

20050212	mem	Add mml-bio module for some basic buffered I/O.
			  I seem to keep writing this sort of thing now
			  and then, and finally got around to adding it
			  to mml.  Nothing against buffered stdio stuff,
			  but sometimes you need to peek inside the
			  control structures, and/or combine buffered and
			  unbuffered operations, in ways that aren't
			  really allowed there.  Doing some rudimentary
			  buffered I/O on your own is often an
			  alternative.

20050212	mem	mml-in: Change the semantics of stream input
			  slightly.  Formerly, an input stream would
			  return EOF, and that stream would get popped
			  off the input stack and input would move on
			  to the next lower stream.  I need a way to
			  return EOF without popping the stream, so
			  now low level streams have to return one
			  of the INS_xxx special characters.

20050306	mem	mml-bio: In bio_timeout_set, the note says
			  that the timeout value is constrained to
			  be non-negative, but the code didn't
			  check the value.  Make it.

20050410	mem	Reuben Farrelly sent me a compile log from
			  a Fedora RC4 system; use this to clean up
			  a bunch of issues mainly relating to
			  missing system-level include files.

20050410	mem	Similar to above: compile with extra warnings
			  enabled and fix some more minor things,
			  especially "unsigned char" vs "char"
			  "conflicts" and various places where
			  functions were used but not declared.

20050410	mem	mml-iopf: In igetbtrecc, the statement
			  "totalcC == cC;" should have been
			  "totalcC = cC;" . Caught by "-Wall" checking
			  above.

20050505	mem	Bugfix: in mml-in.h in the IN_SSTR struct
			  the buffer pointer cs_bufP should be UBYTE *
			  and not char * .  The char * results in
			  sign promotion which can result in false
			  EOF being seen (e.g. if the input char
			  is 0xff).

20050607	mem	First pass at autoconfig (autoconfiscation).
			  Much refinement likely needed.  While here:
			  - make tmclock.c include mml.h
			  - fix some compile issues with some of
			    the test programs

20050610	mem	Improve autoconf detection of where the resolver
			  code is (libc, -lbind, -lresolv); admittedly
			  in a very kludgy way.  Thanks again to Reuben.

20050626	mem	mml-dns: rework a little so that if a DNS
			  query result is truncated (returned length
			  greater than buffer size), we'll try to
			  allocate a larger buffer to match (and thus
			  presumably fall over to TCP query).  This
			  changes the MML_DNS struct somewhat.

20050628	mem	Minor tweaks in configure.ac and documentation.

20050905	mem	Bugfix: mml-str.c; wildcard string match is
			  supposed to remember the wildcard submatches.  It
			  wasn't remembering the '?' submatches.  Make it
			  do so.

20050905	mem	Fix: mml-str.c, wildcard string match was being too
			  anxious to remember the *-matching substrings.
			  The procedure should be to remember the substring
			  only when the subsequent parts of the pattern have
			  been proven, but it was remembering the match and
			  then attempting to match the rest of the string.
			  This can result in lots of false rememberings (the
			  result is still OK, just lots of wasted time).

20050905	mem	While thinking about the match routines... make some
			  misc changes to some of them.  I anticipate
			  wanting to add a "greedy" flag which would control
			  whether submatches are to consume as much as they
			  can from the left.  Passing multiple flag values
			  as separate arguments gets ugly, especially if you
			  can predict that there might be more in the
			  future, so I collapsed the multiple flag values
			  into a single flag bitmask.  Since I am here
			  disrupting the calling interface, I also added a
			  "compiled pattern" argument.  Not used at present,
			  this will just help prepare for being able to
			  precompile the a pattern in the future.  The
			  generic match functions have not been given this
			  argument, under the theory that only the specific
			  underlying routines will have a compiled pattern
			  interface.

20050920	mem	Update some copyright lines; repackage

20051025	mem	Incorporate one of my other (small) random libraries
			  into mml, this being mml-cgi, which provides some
			  simple functions to interface to an Apache
			  HTTP server CGI environment.  That code is from
			  1994; make some minor tweaks to fit it in here.

20051106	mem	Added some token pool access macros to mml-iopf.h .
			  (I got tired of typing all those structure and
			   array references by hand.)

20051201	mem	Add estr_tmp_estr_new() and estr_tmp_nstr_new()
			  functions to mml-str; used to create new copies
			  of strings (in a new temporary ESTR) rather than
			  a new reference.

20051212	mem	Add mml-base64 module

20051212	mem	Add estr_token_ws() and strtoken_ws() functions
			  to mml-str, although perhaps they belong in
			  mml-iopf.  Yet more little tokening routines.

20051214	mem	Add mdns_query_type_str() to mml-dns

20051214	mem	Add ns_t_cname case to mdns_ans_set() (no new
			  code, just new case label).

20051214	mem	Add ns_t_txt case to mdns_ans_set() -- new code.

20051218	mem	Add refstr_move() to mml-str.  Clarify refstr_ref()
			  comments/usage.

20051222	mem	Add str_find_token_delimited() to mml-iopf.  This is
			  similar to gettoken but finds a token in place
			  rather than extracts a token into a new buffer.
			  Some lack of features result (e.g. one can't
			  recognize escaped/quoted characters) but it has
			  its uses.  Also some tweaks to gettoken() to make
			  use of forked code; while there, fix a bug with an
			  uninitialized character variable in an atypical
			  code path.

20051222	mem	Add estr_tmp_estr_tmpstr().  Also improve
			  estr_tmp_estr_new to guarantee that the new
			  string copy is NUL-terminated (even though the
			  resultant ESTR is a counted encapsulation).

20051222	mem	Add magic values -2 and -3 for the refstr_ref()
			  function, to allow easy reference to the
			  base string before and after the reference
			  string.

20051230	mem	Add bio_finit() in mml-bio.

20060101	mem	Update copyrights for 2006

20060102	mem	Bugfix: mml-bio.h had bio_fd as a UBYTE, should
			  be an int.

20060106	mem	Bugfix: in mml-dns, "mdns_free" was somehow
			  misspelled.

20060106	mem	Add some locking of critical code sections using
			  pthreads mutexes if available.  Also add the
			  file README.pthreads with a little info about
			  what is protected and what is not.

20060106	mem	Add configuration option "--enable-pthreads" to
			  control the prior item (building with pthreads
			  support).  Default is disabled.

20060106	mem	Also in support of locking for applications,
			  add mdns_lock() and mdns_unlock().

20060109	mem	Add bio_putstr()

20060113	mem	Bugfix: in igetbtrecc(), the test to see if a line
			  ended with backslash was wrong.  Furthermore,
			  the code was not discounting the backslash
			  before appending the next line.  If that weren't
			  enough, the total character count was being
			  computed incorrectly.  Fix all.

20060215	mem	mml-dns: remove IP4 type, which was a union between
			  IP octets and IP value (and I knew better decades
			  ago, argh).  Use explicit conversions instead.
			  Add mdns_ip4_iptoba() and mdns_ip4_batoip().
			  Update dnstest test program.

20060219	mem	mml-ll: add function ll_addvb;
			  Change so that released nodes are put onto a
			  free list instead of deallocated, and new nodes
			  are allocated from the free list if possible.

20060220	mem	mml-str: add bstr_printf and bstr_vprintf.

20060220	mem	mml: bstr_vprintf needs va_copy() which isn't
			  available everywhere.  Update configure to
			  check for it, and provide a simple hack macro
			  if it isn't available.

20060221	mem	mml-alloc: add Mml_malloc_verboseF flag and some
			  output if it is set.

20060221	mem	mml-alloc: make erealloc use emalloc for new
			  allocations (instead of calling malloc)

20060223	mem	mml-avl: add a t_walkP element to the AVL tree
			  structure, so a caller of avlwalk can store
			  some context info.  Dunno why this was never
			  done before.

20060225	mem	mml-fmt: change non-strol version of atoh and atoo
			  to skip leading spaces and to recognize optional
			  leading + or - sign.

20060225	mem	mml-fmt: add atod to go along with atoh and atoo.
			  As with atoh and atoo, uses strtol() if available,
			  which is likely.

20060225	mem	mml-str: in estr_to_l, use atod() instead of
			  atol().  Mainly to enable processing of
			  optional leading + or - sign on systems that
			  don't implement atol() via strtol().

20060227	mem	mml-avl: add a t_infoP element to the AVL tree
			  structure, so that the program can associate some
			  private info with the tree.  As with t_walkP,
			  dunno why this was never done before.

20060227	mem	mml-symtab: I have found it useful to be able to
			  have symtab_lookup return NULL when passed a
			  NULL table pointer (so some general functions
			  that include a check for a symbol can be used
			  in a program even before the program has completely
			  initialized).  Make all of the symtab functions
			  check the table pointer for null; they should
			  probably have done so anyway.

20060227	mem	mml-avl: re last edit, figured I should do the
			  same for avl functions.  Put in checks for NULL
			  tree pointer into avl functions where relevant.

20060301	mem	mml-in: add in_token_ws().

20060301	mem	mml-in: add in_lineno and in_name().

20060301	mem	mml-in: add in_clineN to the MML_IN struct to
			  cache the line number of a stream.

20060307	mem	mml-str: add refstr_new_bstr_copy() and
			  refstr_new_bstr_steal()

20060317	mem	mml-str: the refstr element rs_bX is the current
			  byte index context in the refstr.  Make it so
			  that a value of -1 means uninitialized.  Will
			  think about doing the same for BSTR's bs_bX
			  but that may be too disruptive.

20060317	mem	mml-str: bugfix-- noted that refstr_adjust (which
			  fixes up refstr offsets for related refstrs when
			  the underlying string changes) was attempting
			  to adjust the rs_bX element.  This is wrong:
			  rs_bX is already relative to its refstr
			  and shouldn't be touched.

20060323	mem	mml-fmt: add atodu().

20060323	mem	mml-str: bugfix-- if HAVE_STRTOL wasn't defined,
			  there was some code that referenced 'bufP'
			  when it should have referenced 'strP' .  This
			  was in atod, atoh, and atoo.

20060327	mem	mml-dns: in mdns_ans_set, make sure an ip address
			  is returned in network byte order.  This was
			  broken when converted to use mdns_batoip().
			  Update dnstest as well.

20060327	mem	mml-dns: comment only, in mml-dns.h, and in
			  mdns_ip4_batoip() and mdns_ip4_iptoba functions,
			  clarify that the IP address is in host byte order.

20060401	mem	mml-avl: add mml_avl_str_xxx and mml_avl_strp_xxx
			  generic functions for key-only string trees.
			  (about time.)


20060402	mem	mml-str: bugfix in bstr_vprintf(), a boundary case
			  due to the way that ssnprintf takes and returns
			  its length argument.  The length you give it must
			  include the NUL, but the length it returns does
			  not include the NUL.  (I understand this, you give
			  it the actual buffer length, and the length it
			  returns allows you to skip to the NUL, but it's
			  still a pain.)

20060409	mem	mml-ll: update mml-addvb calling sequence: if
			  passed a NULL node, it will now add the new node
			  to the tail of the list.  This also requires
			  passing the list head in that case.

20060410	mem	mml-avl: bugfix, avldelete wasn't unlocking the tree
			  if the deletion failed.

20060415	mem	mml-alloc: I'm always creating free lists for
			  dynamic memory that's likely to be reused, e.g.  a
			  free list for linked list nodes, a free list for
			  MML_IN stream nodes, etc.  Time to free myself
			  from that, and generalize this in the alloc
			  interface.  Add two new functions:  erualloc() and
			  derualloc() for re-usable allocation and
			  deallocation.  Also update the other allocation
			  routines to make sure their results and inputs are
			  compatible with these ru-functions (so the return
			  from emalloc may be given to derualloc).
			  Generality may add some slight overhead but it
			  also allows easier use, and allows similar-size
			  allocations to all use the same list.  Some malloc
			  libraries make attempts at this sort of binning
			  automatically, but usually it's just better to
			  do it in the application if you know that's what
			  you want.

20060415	mem	mml-ll: Remove the free node list, use the reusable
			  allocation described above.

20060415	mem	mml-in: Similarly, remove the three free lists:
			  Cfile_listP, for counted file stream handles;
			  Instr_listP, for stream handles;
			  Sstr_listP, for string stream handles.

20060430	mem	mml-ll: Add ll_finit() function to finalize
			  (destroy) a linked list.  One purpose is to
			  prevent mutex leakage (must destroy any mutex) for
			  applications that create and delete lots of linked
			  lists.  This should probably always have existed
			  just for the sake of symmetry anyway.  Should
			  probably add other symmetric functions (e.g.
			  corresponding to avlnew() and mdns_new() ).

20060430	mem	add macro mml_mutex_destroy() and fake (fthread)
			  pthread_mutex_destroy function, both to go with
			  previous edit.

20060430	mem	Add comments to mml-avl.h and .c clarifying that
			  avldeltree does NOT destroy the tree, merely
			  removes its contents.

20060430	mem	mml-str: in refstr_free, call ll_finit() to
			  finalize the REFSTR list when deleting the
			  refstr base.

20060506	mem	mml-avl: clear the tree's node counter after
			  avldeltree().

20060522	mem	mml: add --enable-memory-debugging flag.  When
			  enabled adds some tracks about memory allocations.
			  Not for general use, don't enable needlessly.

20060522	mem	mml-alloc: add support for --enable-memory-debugging;
			  remembers all allocated memory in a list, and
			  add mml_alloc_dump() to dump the list to a file.

20060522	mem	mml-avl: clarify the documentation of avldelete
			  return value.

20060522	mem	mml: better testing of pthread function returns.

20060522	mem	mml-ll: bugfix: dumb pthreads will not destroy a
			  lock that the current thread owns: it would seem
			  natural to atomically unlock + destroy in one
			  operation, but no...  so, fix ll_finit() to
			  release the lock before destroying it.

20060602	mem	mml-avl: add _nolock and _nounlock versions of
			  avldelete(), avlfind(), avlinsert(), and
			  avlwalk().  Useful to give the caller a little
			  better locking control (e.g. when a lock needs
			  to be maintained over several operations, or
			  after an operation).  Also rearrange the
			  order of functions in the module to conform to
			  the usual practice.

20060602	mem	mml-ll: add node count in linked list header,
			  maintain it in ll_ functions.

20060609	mem	mml-in, mml-iopf, mml-ttio, mml-bio:
			  Rework some of the stuff dealing with input
			  streams (some of this was on the TODO list
			  and some was implied):
			  - each stream now has an associated finish
			    function, which is called when popped from the
			    stack.  Formerly, the stream was expected to
			    clean itself up on EOF, which left all the
			    non-EOF cases unhandled.  Now, for example, an
			    application can pop streams (or destroy a stack)
			    and have each stream clean itself up;
			  - stream functions are now called with the stream
			    pointer rather than with what was thought to
			    be relevant members;
			  - changes to the 'push' function calling sequence;
			  - changes to the naming of some of the supplied
			    stream handlers (better naming, plus it helps
			    insure that any old code will have to be edited
			    before being updated);
			  - move of some definitions to mml.h where they
			    can be more generally useful, some names changed;
			  - addition of error and status information in
			    the MML_IN stack, and code to maintain this
			    information within stream handlers.
			Much of this has been 'needed' for a long time but
			  I've been putting it off since it is disruptive;
			  however, finally took the plunge.

20060609	mem	mml-bio: bio_getb was returning FALSE if failure
			  to set up buffers.  Supposed to be a negative
			  character code, fix.

20060623	mem	mml-cgi: change qarg_put() so that it makes a safe
			  copy of its strings.  Prior to this, the caller
			  was required to ensure that the strings were
			  safe.  I want to be able to deallocate the saved
			  copies, so this means that qarg_put is required to
			  make an allocated copy (rather than just assume
			  the strings are safe).  All applications that use
			  qarg_put should be changed, although it won't hurt
			  too much if they aren't (there will just be a
			  duplicate copy made).  Fortunately I'm the only
			  one that uses this, so I can track them down.

20060623	mem	mml-cgi: add qarg_value_set() to replace the value
			  of a qarg.  This is the reason for the prior edit.

20060623	mem	mml-cgi: mml-cgi.c wasn't #including mml-cgi.h

20060626	mem	mml-iopf: bug in gettoken if empty quoted string;
			  was not recognizing this as a real token.
			  Definitely one of those "how could this bug have
			  lurked here so long" things.

20060717	mem	mml-cgi: qarg_put was returning NULL in one error
			  return; change to FALSE.

20060806	mem	mml-str: add bstr_quote_str_n (and bstr_quote_str
			  which is just a wrapper to it).  This may be
			  a work in progress, especially the alternate
			  quoting style stuff.

20060814	mem	mml-str: add estr_tmp_bstr()

20060814	mem	mml-in: initialize line number to 1, not 0.
			  1-based seems better for humans.

20060820	mem	mml-str: rename estr_newstr() to newstr_estr() to
			  be more consistent with other alleged naming
			  conventions.

20070101	mem	Update copyrights for 2007

20070330	mem	Change timeouts to use seconds + microseconds
			  rather than just seconds.  Unfortunately
			  requires change to bio_timeout_set interface.

20070330	mem	Add bio_getb_check()

20070406	mem	Bugfix: tmpstr_estr wasn't NUL-terminating its
			  return when it returned a string copy!

20070907	mem	Add mdns_query_canon().
