MPDM Release Notes
==================

2.54
----

 - New features:
    - File descriptors are now executable; by executing one
      without arguments, a line is read; otherwise, it there
      are arguments, all of them are written into it.
    - New function mpdm_utf8_to_wc().
    - New function mpdm_chomp().
    - mpdm_write() also accepts arrays and files as the argument
      to be written, iterating it recursively.
 - Important changes:
    - The mpdm_hmap() function has been renamed to mpdm_omap().

2.53
----

 - New features:
    - New function mpdm_feof().
 - Bug fixes:
    - Fixed double quote escaping error in JSON export.
    - Fix bug in pclose waiting for child termination on
      the first pipe (work by X-Ryl669).
    - Fixed extern definition to mpdm_destroy().

2.52
----

 - New features:
    - mpdm_fmt() now accepts the %J markup for 'lax' JSON, i.e.,
      the root value can also be a literal.
    - Ortogonally, the mpdm_sscanf() function also accepts
      the %J markup to parse 'lax' JSON.
 - Changes:
    - The old API (hash functions and array functions named
      mpdm_a...) is now disabled by default; if you still
      have old code, defined MPDM_OLD_COMPAT before mpdm.h.
    - Disable Zlib support by default; enable with config
      shell option `--with-zlib'.
 - Bug fixes:
    - Some memory leaks.

2.51
----

 - New features:
    - New function mpdm_multiply(), supporting number * number,
      string * number and array * number.
    - New function mpdm_substract(), supporting number - number,
      array1 - array2 (returning a new array with the elements
      in array1 that are *not* in array2), array - object
      (returning an array with the keys *not* in object),
      object1 - object2 (returning a new object with the elements
      in object1 *not* in object2) and object - array (returning
      a new object with the elements in object that are *not*
      indexed by any element of array).
    - Pipes now inherit the environment from the ENV object.
    - New function mpdm_gzip_inflate().
    - New functions mpdm_read_tar_mem() and mpdm_read_tar_file().
    - mpdm_join() and mpdm_join_wcs() now can accept files.
    - Read and write encoders for Windows-1252 code page.

2.50
----

 - New features:
    - The object interface now replaces the old hash interface,
      that it's still available as a compatibility layer.
    - New function mpdm_escape(), to escape a range of characters
      in a string.
    - map() with a string filter is accepted as a mpdm_fmt() format
      and used as is, expecting one % mark (or none, in case of
      mapping string constants).
    - In mpdm_fmt() the %b (output number as binary) now accepts
      zero-padding and maximum number of digits.

2.42
----

 - License change: released into the public domain.
 - Architectural changes:
    - Values now have a type and no flags.
    - There is a clear differentiation between integers, reals
      and strings. Also, they can be iterated specially.
    - A semantic change to mpdm_read(): EOLs are purely treated
      as line separators, so if a read reaches EOF but previous
      line had an EOL, a final, empty line is returned.
    - Extended values no longer exist, nor cached ival and rval.
    - Renamed most functions that used wide strings and ended
      with _s to _wcs (e.g. mpdm_cmp_s() to mpdm_cmp_wcs()).
 - New features:
    - Files can work in auto-chomp mode (automatic clipping of
      the EOL sequence). This sequence can be retrieved using
      the file function mpdm_eol(). Auto-chomping is enabled
      by setting the global AUTO_CHOMP variable to true, checked
      on each call to mpdm_open().
    - mpdm_join() can join integers and reals by summing them.
    - utf-8 reading and writing is done upto 4 bytes.
    - New function mpdm_random() (moved from MPSL). Accepts an
      integer [0, range), NULL [0.0, 1.0) or an array to pick
      one of its elements.
    - mpdm_regcomp() is now non-static and can be used to
      use compiled regexes as pure values.
    - mpdm_map() can map strings to regexes (providing the
      same functionality as the dropped 'g' flag in regexes).
    - mpdm_map() can map iterable values to strings, returning
      an array with the same string many times.
    - mpdm_map() can also map iterable values to arrays, using
      them as translation tables.
    - New function mpdm_count(), to return a type-specific
      number of elements (values in arrays and objects and size
      of stringify value otherwise).
    - Read and write encoders for MSDOS codepages 437 and 850.
    - mpdm_splice() also works with arrays. Also, its syntax
      has changed and no longer returns a two-value array but
      accepts optional pointers to values.
    - New function mpdm_del(), complementary to mpdm_get() and
      mpdm_set() (multitype).
    - New function mpdm_type() to get a value's type.
    - New function mpdm_type_wcs() to get a value's type as a
      string.
 - Dropped features:
    - Flags 'l' (last) and 'g' (global) in regexes are no longer
      supported.
    - mpdm_slice() no longer exists (use mpdm_splice()).
    - As flags have disappeared, all macros for testing them
      are also gone. Do the checking using types.
    - MPDM_LS() no longer exists; replace it with MPDM_S() and
      move on.
    - Channels no longer exist.

2.30
----

 - Architectural changes:
   - Moved "destroy" functions from the extended values to a global
     type information structure.

2.21
----

 - New features:
   - Added the concept of "extended" values: they contain an
     addition "destroy" function, called when the value is destroyed.
     Also, only these extended values stored cached ival and rval.
     This way, many values use much less memory.
 - Other changes:
   - mpdm_iterator() has changed the order of args from k, v to v, i.
   - The version numbering has changed from X.X.X to X.XXX (real number).

2.1.6
-----

 - Bug fixes:
   - Dump backslashes correctly in JSON.

2.1.5
-----

 - Bug fixes:
   - Escape the base directory in glob().
   - Fix a parsing bug in json_lexer().
 - New features:
   - New array function mpdm_reverse().

2.1.4
-----

 - Use the APPID variable in mpdm_app_dir().

2.1.2
-----

 - New features:
   - mpdm_join() joins more types.
   - mpdm_iterator() returns index/element pairs when iterating
     an array and can also iterate files and numbers.
   - New function mpdm_fmt(), like mpdm_sprintf() but for only one value.
     As a bonus it includes the percent-commands `j' (output as JSON) and
     `t' (followed by a curly brace-enclosed strftime() format).
   - mpdm_sscanf() also supports a %t command, to parse a time string
     (inverse of the one in mpdm_fmt(), and %j, to parse a JSON string.
   - New channel implementation (bidirectional communication for
     threads).
   - New function mpdm_rename().
   - New function mpdm_slice().
   - New function mpdm_getcwd().

2.1.1
-----

 - New features:
   - mpdm_join() allows the joining of two arrays.
   - New function mpdm_set().

2.1.0
-----

 - New features:
   - Support for client TCP/IP connections via the new
     mpdm_connect() function.
   - New function mpdm_tr(), to transliterate strings.
 - Bugfixes:
   - The pclose() win32 implementation returns the process exit
     status correctly.

2.0.1
-----

 - Optimizations:
   - Numeric values created with MPDM_I() and MPDM_R() do not have
     their string representation created until needed by a call to
     mpdm_string() (which can never happen).
 - New features:
   - New function mpdm_sget_i().
   - New macros MPDM_AA() and MPDM_AS(), for local stack-allocated
     (i.e. using alloca()) arrays and strings, meant to be used
     for optimized, short-lived temporary values.

2.0.0
-----

 - The system has been refactored to be a pure reference counting
   system, so sweeping / garbage collection no longer exists.
 - Executable values and functions now include a new argument to
   hold a context (used to implement local symbol tables and such).
 - mpdm_adel() and mpdm_hdel() no longer return the deleted element.
 - mpdm_aset() and mpdm_hset() no longer return the old element.
 - mpdm_sort() sorts the array instead of returning a new one.
 - New functions mpdm_strcat_sn(), mpdm_pokewsn(),
   mpdm_join_s(), mpdm_split_s(), mpdm_cmp_s(), mpdm_strcat_s().
 - Some refactoring to diminish memory usage (no more `prev'
   pointers in the value list, less residual values).
 - mpdm_regex() always return an array in global searches (maybe
   an empty one) and if searching for an array of regexes (maybe
   be a partial one).
 - The following functions had had their arguments swapped:
    - mpdm_split() and mpdm_split_s().
    - mpdm_join() and mpdm_join_s().
    - mpdm_sscanf().
    - mpdm_regex().
    - mpdm_sregex().

1.0.9
-----

 * mpdm_ival() now accepts numbers prefixed by `0b' as binary
   numbers.
 * Similarly, mpdm_sprintf() now accepts the `%b' code to
   print a value as a binary number.
 * Fixed mpdm_sset() when the previous-to-last value to be
   assigned is executable (this is bug 1114).
 * New function mpdm_iterator().

1.0.8
-----

 * New function mpdm_sscanf().
 * Fixed mpdm_encoding() to allow again empty strings as its
   argument to fall back to default encoding.
 * Improved file encoding autodetection by looking at the
   UTF BOM marks. The detected encoding is stored in the
   `DETECTED_ENCODING' root key.

1.0.7
-----

 * Fixed a bug when processing backslashes in the substitution
   string in sregex(), that made them dissappear if they were
   not escaping an ampersand.
 * Fixed a bug in win32 globbing.
 * The dump_1() function is now pluggable.
 * New function mpdm_chdir().

1.0.6
-----

 * The environment is stored in a hash called ENV in mpdm_root().
 * Under win32, the LANG environment variable is hand-built if
   none is set.
 * If the third argument to sregex() is a hash, the values can
   now also be executable ones.
 * New internal flag for values to mark them as deleted.

1.0.5
-----

 * The mpdm_regex() function now accepts a new flag, `g', to match
   globally; in this case, an array of matches are returned instead
   of a string scalar.
 * The mpdm_stat() function now returns a 14 element array, with a
   newly #13 argument containing the canonicalized file name, if
   the underlying system supports it.
 * A bunch of embedded charset encoders have been implemented for
   iso8859-1, utf-16 and utf-32 with or without BOM autodetection.

1.0.4
-----

 * API Changes; const has been added wherever possible.

1.0.3
-----

 * The hashing function has changed to a less accurate but faster one.
 * There is a new, adaptive way of sweeping: if default_sweep if set
   to a negative value (different from -1), it's used as a divisor
   of the total count of values; this will be the number of values
   that will be swept on each call to mpdm_sweep(0). This way, the
   number of swept values depend on the total count.
 * New functions mpdm_set_ival() and mpdm_set_rval().
 * New function mpdm_get_filehandle().

1.0.2
-----

 * Components of a compact symbol can be executable, apart from
   hashes and arrays.
 * mpdm_cmp() is optimized to return 0 when comparing the same value.

1.0.1
-----

 * mpdm_cmp() now correctly compares NULL and NULL as equal.
 * %c in mpdm_sprintf() now works with Unicode (wchar_t) characters.
 * The substitution string in mpdm_sregex() now can include the
   special character & to select the matched string. To include a
   literal &, escape it with \.
