2007-02-12  Shmuel

	* all sources (match, find, tfind, exec, dfa_exec): [API change]
	    in case of ordinary non-match, only a nil is returned;
	    other non-match cases generate an error.

	* test suite and the manual: updated to reflect the above API change.

	* all sources (gmatch, split, gsub): [bugfix]
	    if during repeated matching pcre_exec/regexec returns a value that
	    means neither match nor no-match, then an error is generated.

	* common.h (REX_VERSION): updated to "2.1.0".

2007-01-29  Shmuel

	* lposix.c (checkarg_find_f): [bugfix] incorrect default for eflags.
	* lposix.c (generic_find): [bugfix] dereferencing uninitialized pointer.
	* common.h (REX_VERSION): updated to "2.0.2".

2007-01-27  Reuben Thomas  <rrt@sc3d.org>

	* lpcre.c, lposix.c (gsub): [bugfix]
	    - it was incorrectly assumed that the value on Lua stack was a string;
	    - luaL_error was used where lua_error was more appropriate;

2007-01-18  Shmuel

	* lpcre.c (gsub): [API change undone].
	* all source files: refactoring.

2007-01-14  Shmuel

	* lpcre.c (gsub): [API change]:
	    a) 2-nd return of rep() is ignored --> API-compatible with string.gsub
	    b) argument `n' can be a function --> API extension wrt string.gsub

2007-01-13  Shmuel

	* lpcre.c, lposix.c: refactoring.
	* common.c, common.h: refactoring.
	* common.h (REX_VERSION): a new #define.
	* lpcre.c, lposix.c (REX_OPENLIB): using REX_VERSION.

2007-01-12  Shmuel

	* common.h, common.c: a nasty bug fixed.
	* lpcre.c, lposix.c: version updated to 2.0.1.

2007-01-10  Shmuel

	* lpcre.c, lposix.c: refactoring.

2007-01-08  Shmuel

	* lpcre.c, lposix.c: refactoring.

2007-01-04  Reuben Thomas  <rrt@sc3d.org>

	* Add a top-level Makefile with all, clean and test targets.
	* Split src/*.mak common parts into src/common.mak.

2007-01-04  Shmuel

	* lpcre.c (Lpcre_gsub): unnecessary (though harmless) assignment removed.
	* test/runtest.lua: extended the command-line interface.
	* most files: the copyright notice changed to reference LICENSE file.

2007-01-02  Shmuel

	* common.c (CheckFunction, OptFunction): functions removed.
	* lpcre.c (put_integer): function removed.

2006-12-31  Shmuel

	* common.c (udata_tostring): function removed.
	* lpcre.c (Lpcre_tostring): added handling of deleted userdatum.
	* lposix.c (Posix_tostring): added handling of deleted userdatum.
	* lpcre.c: [API change] method `exec' now supports "named subpatterns".
	* test/all_test.lua: renamed to runtest.lua.

2006-12-30  Shmuel

	* lpcre.c: [API change] `versionPCRE' renamed to `version'.

2006-12-29  Shmuel

	* lpcre.c: [API change] removed support of PCRE callout.
	* test/pcre_sets.lua: removed testing of PCRE callout.

2006-12-27  Shmuel

	* lpcre_f.c (config): [API change] the function accepts one optional
	    argument (a table), like the `flags' function.

2006-12-26  Shmuel

	* lpcre.c, lposix.c (gsub): [API change] method become function.
	* test/*.lua: modifying tests to reflect methods become functions.
	* lua/rex.lua: file deleted.
	* lpcre.c (luaopen_rex_pcre): changed the condition for validating
	    run-time PCRE version.
	* lpcre_f.c: added new flags for support of PCRE 7.0.
	* lpcre.c, lposix.c (checkarg_gsub): if the 3-rd argument is of type
	    "number" then it is converted to string (as in string.gsub).

2006-12-25  Shmuel

	* lpcre.c, lposix.c (match, find, gmatch, split): [API change]
	    methods become functions.

2006-12-23  Shmuel

	* test/*.lua: refactoring.

2006-12-22  Shmuel

	* lpcre.c, lposix.c (tfind and exec): [API change]
	    the return value of the underlying pcre_exec/regexec call
	    is not added in the case of successfull match.
	* lpcre.c, lposix.c (gtfind): [API change] method removed.
	* lpcre.c, lposix.c: Lrexlib 2.0 beta -> Lrexlib 2.0.
	* test/luatest.lua (eq): bugfix.
	* lua/*.lua: deleted all lua files except for rex.lua.
	* lua/rex.lua: fully rewritten; now contains wrappers for all methods.

2006-12-21  Shmuel

	* test/*.lua: added tests for `split' method.
	* test/luatest.lua (print_results): function added.
	* test/common_sets.lua: file added.

2006-12-19  Shmuel

	* lpcre.lua:  `split' method added.
	* lposix.lua: `split' method added.
	* test/framework.lua: renamed to luatest.lua.

2006-12-15  Shmuel

	* test/*.lua: refactoring.

2006-12-11  Shmuel

	* test/*.lua: refactoring; deleting files; adding new files.

2006-12-10  Shmuel

	* lpcre.c, lposix.c: gmatch bug fixed. Test case added.
	* lpcre.c, lposix.c: gtfind bug fixed. Test case added.

2006-12-09  Shmuel

	* lua/gsub_test.lua, gsub_tstpsx.lua: 2 files deleted.
	* lua/posix_sets.lua, pcre_sets.lua, framework.lua, all_test.lua:
	    4 files added.
	* lpcre.c, lposix.c, common.c, common.h:
	    an API alteration in gsub and gtfind methods: if a non-positive number
	    is supplied as the 'n' parameter, then no iterations are done.
	    Test cases added to *.lua test files.

2006-12-07  Shmuel

	* lpcre.c, lposix.c (gsub): if parameter rep is a function,
	    and its 2-nd return value (if present) is a string "break",
	    then gsub immediately returns.
	* test/*.lua: refactoring.

2006-12-06  Shmuel

	* lpcre.c, lposix.c: refactoring.

2006-12-05  Shmuel

	* lposix.c: cosmetics.

2006-12-04  Shmuel

	* lpcre.c, lposix.c: introduced new macros: CAP_BEG, CAP_END and CAP_LEN.
	* lpcre.c, lpcre_f.c, lposix.c: refactoring.

2006-12-03  Shmuel

	* lpcre.c (Lpcre_gsub_func): an improvement.
	* lposix.c (posix_gsub_func): an improvement.
	* lpcre.c, lposix.c (gmatch, match, find): functions removed.
	* lpcre.c, lposix.c: method tgfind renamed to gtfind.
	* lpcre.c, lposix.c: gsub function become method.
	* test/posix_test.lua, pcre_test.lua: removed tests for removed functions.

2006-12-02  Shmuel

	* common.c, common.h (TBuffer): moved here from lpcre.c.
	* common.c, common.h (TFreeList): helper class created.
	* lpcre.c (Lpcre_gsub_func): many changes.
	* lposix.c (posix_gsub_func): added function gsub.
	* test/gsub_test.lua: added testing for the new written-in-C gsub.
	* test/gsub_tstpsx.lua: file added.
	* test/rex_.lua: file deleted.

2006-12-01  Shmuel

	* lpcre.c (TBuffer): helper class created.
	* lpcre.c (Lpcre_gsub_func): many changes.

2006-11-30  Shmuel

	* lpcre.c (TExecData): struct renamed to TCallout.
	* lpcre.c (LpcreSetExecData): function renamed to SetupCallout.
	* lpcre.c (Lpcre_gsub_func): added function gsub.

2006-11-29  Shmuel

	* test/*.lua: refactoring.
	* lpcre.c, lposix.c: refactoring.
	* lpcre.c, lposix.c (oldmatch): renamed to tfind.
	* lpcre.c, lposix.c (oldgmatch): renamed to tgfind.
	* */*.lua: renamed: oldmatch -> tfind; oldgmatch -> tgfind.

2006-11-28  Shmuel

	* lpcre.c (Lpcre_dfa_exec): one Lmalloc call instead of two.

2006-11-27  Shmuel

	* common.c (plainfind_func): rewritten to not use memicmp
	* test/*.lua: every test returns number of failures

2006-11-26  Shmuel

	* lpcre.c, lposix.c: all Check_arg_* functions renamed to Checkarg_*
	* lpcre.c (Lpcre_dfa_exec): added 2 arguments to dfa_exec
	* common.h (DIM): macro removed
	* test/pcre_test.lua: tests for dfa_exec method added

2006-11-25  Shmuel

	* lpcre.c, lposix.c: alpha -> beta.
	* lpcre_f.c: file added (was: part of lpcre.c).
	* rex_pcre.mak: updated due to the new file lpcre_f.c
	* *.mak: version updated to 2.0
	* test/all_test.lua: file added.
	* test/posix_test.lua, test/pcre_test.lua: made modules.
	* test/posix_test.lua: tests added.
	* test/*.lua: refactoring.
	* lua/generic_gsub.lua: refactoring.

2006-11-23  Shmuel

	* test/*.lua: refactoring.
	* lua/rex.lua, lua/rex_.lua (gsub): 6th and 7th arguments swapped.

2006-11-22  Shmuel

	* lpcre.c (Check_arg_findmatch_func): 5th and 6th arguments swapped.
	* lpcre.c (Check_arg_gmatch_func): 4th and 5th arguments swapped.
	* test/posix_test.lua: file added.
	* lposix.c: 2 bugs fixed.

2006-11-21  Shmuel

	* test/pcre_test.lua: "named subpatterns" tests added.

2006-11-20  Shmuel

	* common.c, common.h (plainfind_func): function added.
	* lpcre.c, lposix.c (rex.plainfind): new function (from Lua side).
	* test/framework.lua: file added.
	* test/pcre_test.lua: file added.

2006-11-19  Shmuel

	* lpcre.c (Lpcre_config): new function (pcre.config from Lua side).
	* lpcre.c: callout handling improved.

2006-11-18  Shmuel

	* lpcre.c, lposix.c: old 'gmatch' method put back; renamed into 'oldgmatch'.

2006-11-17  Shmuel

	* windows/bcc32/make_bcc.mak: deleted -DCOMPAT51, added -D$(CMDLINE)

2006-11-16  Shmuel

	* gsub_test.lua (PatternLua2Pcre): function renamed into 'pat2pcre'.
	* lua/pat2pcre.lua: file added (was part of gsub_test.lua).

2006-11-15  Shmuel

	* lpcre.c, lposix.c: Lua API has changed:
	    * 'match' method renamed to 'oldmatch'
	    * added (as much as possible) Lua string library API compatible:
	      'find', 'match' and 'gmatch' - each one being a function/method pair.
	* lpcre.c (newPCRE, flagsPCRE): functions removed.
	* lposix.c (newPOSIX, flagsPOSIX): functions removed.
	* lpcre.c, lposix.c: added literal rex._VERSION.
	* rex.lua: deleted everything except gsub.
	* rex.lua (gsub): rex.oldmatch is used instead of rex.match.
	* generic_gsub.lua: rex.oldmatch is used instead of rex.match.
	* test/test1.lua: file added

2006-11-12  Shmuel

	* rex.lua (r:gmatch): metamethod added.
	* lpcre.c (Lpcre_maketables): function API simplified.
	* lpcre.c (Lpcre_getargs): function removed.
	* lpcre.c (LpcreGetExecParams): renamed from LpcreProcessExecParams.

2006-11-09  Shmuel

	* lua/bit.lua: file removed.

2006-11-05  Shmuel

	* rex.lua (gsub): a few structural optimizations.
	* rex.lua (gmatch): a bugfix.
	* rex.lua: tests deleted from the file.
	* gsub.lua: renamed into 'generic_gsub.lua'; made a module.
	* new_gsub.lua: file deleted.
	* lua/bit.lua: file added.

2006-11-04  Reuben

	* rex.lua (gmatch): function rewritten to be compatible with
	    string.gmatch.
	* find.lua: file deleted.
	* lpcre.c (Lpcre_gmatch): function deleted.
	* lposix.c (posix_gmatch): function deleted.

2006-11-04  Shmuel

	* gsub.lua, new_gsub.lua, gsub_test.lua, rex.lua: bugfixes.

2006-10-18  Shmuel

	* [Windows] DLL builds need lua5.1.dll rather than lua51.dll.

2006-10-02  Shmuel

	* Support of Lua 5.0 was dropped.

2006-09-03  Shmuel

	* common.h (REX_LIB_API): renamed into REX_API.
	* common.h (flags_pair): renamed into flag_pair.
	* common.h, lpcre.h, lposix.h (REX_REGISTER): renamed into rex_register.
	* lpcre.h (luaopen_rex_pcre): error message text changed.
	* lposix.c (posix_handle, posix_typename):
	    string literals are prefixed by $(REX_LIBNAME).
	    [ This makes possible using multiple rex_posix libraries
	      at a time by one lua_State. ]
	* lpcre.c (pcre_handle, pcre_typename):
	    string literals are prefixed by $(REX_LIBNAME).
	    [ This makes possible using multiple rex_pcre libraries
	      at a time by one lua_State. ]
	* added directory test/Spencer (containing test.lua).
	* test/Spencer/test.lua: file returns a function.

2006-08-27  Shmuel

	* (local) merge with the version put into CVS by R.Thomas.
	* common.h: added conditional #define's for lua_pushinteger and
	    lua_tointeger (needed to compile with Lua 5.0).

2006-08-18  Shmuel

	* common.c, lpcre.c, lposix.c: lua_pushnumber replaced with
	    lua_pushinteger where appropriate (in many places).
	* lpcre.c (put_number): function renamed into put_integer.

2006-06-17  Shmuel

	* lpcre.c (TPcreExecParam): `use_callout' struct member was eliminated.
	    Instead, a special value of function reference (LUA_NOREF) is used.

2006-04-01  Reuben

	* lpcre.c, common.c: Remove trailing whitespace.
	* lpcre.c (Lpcre_gmatch): Remove unnecessary limit variable.

2006-02-17  Shmuel

	* common.c, common.h (L_lua_error): function deleted.
	* common.c, lpcre.c, lposix.c: luaL_error used in place of L_lua_error.
	* lposix.c (posix2): struct renamed into TPosix.
	* lposix.c (posix_comp): lua_newuserdata() used instead of Lmalloc().

2005-12-26  Shmuel

	* Separate makefiles for POSIX and PCRE. No config file.

2005-11-28  Shmuel

	* common.h (REXLIB_API): macro renamed into REX_LIB_API.
	* lposix.c (LREXLIB_POSIX_EXT): macro renamed into REX_POSIX_EXT.

2005-11-26  Shmuel

	* common.h (LUAL_REGISTER): macro renamed into REX_REGISTER.
	* lpcre.c (LUAOPEN_LIB): macro renamed into REX_OPENLIB.
	* lpcre.c (LIBNAME): macro renamed into REX_LIBNAME.

2005-11-15  Shmuel

	* common.c, common.h, lposix.c, lpcre.c: new files (lrexlib.c was
		  splitted); POSIX and PCRE parts now live in their own
		  separate files.
	* common.h (REXLIB_API): new macro.
	* lposix.c (LREXLIB_POSIX): macro removed.
	* lposix.c (LUAOPEN_LIB, LIBNAME): new macros.
	* lposix.c (rexlib): Lua-side functions flagsPOSIX and newPOSIX
		  now have aliases (flags and new, correspondently).
	* lpcre.c (LREXLIB_PCRE): macro removed.
	* lpcre.c (LUAOPEN_LIB, LIBNAME): new macros.
	* lpcre.c (rexlib): Lua-side functions flagsPCRE and newPCRE now
		  have aliases (flags and new, correspondently).
	* lpcre.c (Lpcre_vers): function renamed into Lpcre_version.

2005-11-12  Shmuel

	* lrexlib.c (LUAL_REGISTER): new macro.

2005-11-10  Shmuel

	* lrexlib.c (posix_match_generic): return (on Lua-side) an
		  additional value (the return code of regexec).
	* lrexlib.c (Lpcre_match_generic): return (on Lua-side) an
		  additional value (the return code of pcre_exec).
	* lrexlib.c (Lpcre_dfa_exec): return (on Lua-side) an additional
		  value (the return code of pcre_dfa_exec).

2005-10-29  Shmuel

	* lrexlib.c (get_flags): the function now accepts one parameter
		  from the Lua stack (a table). Was: no parameters. (This
		  affects the Lua-side functions: flagsPOSIX and
		  flagsPCRE).
	* lrexlib.c (LREXLIB_POSIX_EXT): it's now possible to force-define
		  this macro at compile time, bypassing the automatic
		  detection.
	* lrexlib.c: added new POSIX flags (error values).
	* lrexlib.c (LpcreProcessParams): renamed into
		  LpcreProcessExecParams.
	* lrexlib.c: added all missing PCRE flags starting from PCRE
		  version 4.

2005-10-25  Shmuel

	* lrexlib.c (DIM): new macro.
	* lrexlib.c (pcre2): renamed into TPcre.
	* lrexlib.c (TPcreExecParam): new struct.
	* lrexlib.c (LpcreProcessParams): new function.
	* lrexlib.c (Lpcre_dfa_exec): new function. Lua-side: dfa_exec.
	* lrexlib.c (Lpcre_dfa_restart): new function. Lua-side: dfa_restart.

2005-10-23  Shmuel

	* lrexlib.c (TPcreCalloutData): new struct.
	* lrexlib.c (Lpcre_callout): new function.
	* lrexlib.c (Lpcre_match_generic): PCRE callout support added.
	* lrexlib.c: added new PCRE flags (from PCRE versions 5 and 6).
	* lrexlib.c (put_number): new helper function.

2005-05-27  Shmuel

	* lrexlib.c: updated to work with Compat-5.1.

2004-12-18  Shmuel

	* lrexlib.c (regex_tostring): error handling added.
	* lrexlib.c (regex_tostring): renamed into udata_tostring.
	* lrexlib.c (regex_get_flags): renamed into get_flags.
	* lrexlib.c (Lpcre_comp): pattern offset included in error message.
	* lrexlib.c (Lpcre_comp): error check added after pcre_study call.
	* lrexlib.c (Lpcre_push_substrings): eliminated inserting nil
		  values into the matches table (not a bug, redundancy).
	* lrexlib.c (Lpcre_push_substrings): lua_rawset call instead of
		  lua_settable.
	* lrexlib.c: all stack buffers used for message formatting changed
		  in size from 128 to 256 bytes.

2004-11-17  Nick Gammon  <nick@gammon.com.au>

	* lrexlib.c (pcre2): new member pcre2.extra.
	* lrexlib.c (Lpcre_comp): pcre_study call added.
	* lrexlib.c (Lpcre_push_matches, Lpcre_push_substrings,
		  Lpcre_push_offsets): function signatures changed.
	* lrexlib.c (Lpcre_push_substrings): added support for "named
		  subpatterns".

2004-09-15  Shmuel

	* gsub.lua (is_odd): Function removed; math.mod used instead.

2004-08-24  Shmuel

	* ChangeLog: File added.
	* NEWS: File added.

2004-08-12  Shmuel

	* lrexlib.c (posix_exec, Lpcre_exec): New C functions, that
		  correspond to the new lua function 'r:exec'.
	* lrexlib.c (posix_tostring, Lpcre_tostring): New C functions,
		  that correspond to the new lua function 'r:__tostring'.
	* lrexlib.c: A table returned by r:match() as its 3rd result has
		  no "n" index set anymore.
	* lrexlib.c (LREXLIB_POSIX_EXT): New macro.
	* lrexlib.c (PCRE_LOCALE_SUPPORT): Macro removed.
	* lrexlib.c (posix_push_matches, Lpcre_push_matches): Functions
		  became typedef's.
	* lrexlib.c (posix_match_generic, Lpcre_match_generic)
		  (posix_push_substrings, Lpcre_push_substrings)
		  (posix_push_offsets, Lpcre_push_offsets): New functions.
	* gsub.lua: File added.

2004-08-11  Reuben

	* config: Many changes.
	* Makefile: Many changes.

2004-08-11  Shmuel

	* config: File added + many changes.
	* Makefile: Many changes.

2004-07-15  Shmuel

	* lrexlib.c (posix_get_flags, Lpcre_get_flags, Lpcre_vers): New C
		  functions, that correspond to new lua functions
		  'flagsPOSIX', 'flagsPCRE', 'versionPCRE'.
	* lrexlib.c: Lua functions 'newPCRE' and 'newPOSIX' accept an
		  optional 2nd argument ("compilation flags").
	* lrexlib.c: Lua function 'newPCRE' accepts an optional 3rd
		  argument ("locale") - but only if the macro
		  PCRE_LOCALE_SUPPORT was defined at the compilation time.
	* lrexlib.c: Lua function 'r:match' accepts optional 2nd and 3rd
		  arguments ("startoffset" and "execution flags").
	* lrexlib.c: Lua function 'r:gmatch' accepts an optional 2nd
		  argument ("execution flags").
	* lrexlib.c (posix_gmatch, Lpcre_gmatch): If a user-defined lua
		  function passed as the 2nd parameter returns true value,
		  then lua function 'r:gmatch' returns.
	* lrexlib.c (posix_push_matches, Lpcre_push_matches): The table of
		  substring matches contains false in the positions
		  correspondent to non-matched subpatterns.
	* lrexlib.c: Static functions that began with 'pcre' were renamed
		  to begin with 'Lpcre'.
	* lrexlib.c (posix_getargs, Lpcre_getargs):
		  Fixed - allocated memory was not freed.
		  Fixed - removed redundant calls of lua_checkstack.
	* lrexlib.c: Allocation/freeing memory moved from matching
		  operations to pattern-compiling and garbage-collecting
		  ones.
	* lrexlib.c (posix_match, posix_gmatch, Lpcre_match, Lpcre_gmatch):
		  luaL_checkudata is used in checking of userdata-type
		  parameter.
	* lrexlib.c: Removed conditional compilation controlled by the
		  macro REG_BASIC.
	* lrexlib.c (posix_comp): The following invalid ANSI C89 code:
		  size_t sz = <expression>; char errbuf[sz];
		  made valid with the use of malloc/free.
	* lrexlib.c (Lpcre_gmatch): Keeping 'subject' and 'length'
		  unchanged while updating 'startoffset'.
	* lbitlib.c: File removed.
	* Makefile: Removed parts related to lbitlib.c.
	* make_bcc.mak: File added.
