***************************************************************************** * Version 3.1 19 Feb 2007 * ***************************************************************************** Overview ======== * This version continues the cleanup started in the previous version. Additions ========= * New function: vs_scalar(), to build a scalar from a type and value. * New function: va_find_nearest(), to find the nearest scalar to a value in an array. * New function: v_create_object(), to create an object given its type code. * New function: v_create_func(), to declare an object creation function. * New function: vh_add_object(), to add an object to a hash if it's not there. * New function: vg_path_links(), which returns the link data between nodes in a path. * New functions: vh_intern() and vh_interned(), to store and check for unique internal hash key strings. * New function: v_signal(), which can set/unset signal handlers. Changes ======= * All system functions are now prefixed by 'v_'. The old names for these functions are now deprecated. * The v_stat() function now returns a pointer to an internal list which is reused between calls. * The vh_keys() function now always sorts the keys before returning them. * The macros vh_sortkeys() and vh_sortvalues() are now deprecated. * The vh_create() and vh_create_size() macros are now functions. * The vh_create_table() function is now deprecated. * The vh_create_noreuse() macro has been removed. * The vg_path_list() function has been renamed to vg_path_nodes(). Bug fixes ========= * The v_random() function no longer sets errno to ERANGE sometimes. ***************************************************************************** * Version 3.0 17 Jul 2006 * ***************************************************************************** Overview ======== * Many inconsistencies and annoyances have been cleaned up, and some old features are now deprecated. You can still use the old stuff without changing your code, for now, by including the compatibility header vars-compat.h instead of vars.h. Additions ========= * New unified object iteration system, which replaces the old buggy methods (although they're still supported for now). * New (incomplete) set of functions to deal with simple relational databases. * You can now iterate over priority queues. * Parser syntax now deals with strings and string regexp matching. There are new match operators: =~ and !~, and equivalent alphabetical operators for equality and regexp testing: eq, ne, lt, gt, etc. * New array function: va_lookup(), which does various types of interpolation. * New binary I/O functions: v_read_file() and v_write_file(). * New memory allocation functions: v_duplicate() and v_calloc(). Changes ======= * The class of binary I/O functions named *_fread() and *_fwrite() have been renamed to *_read() and *_write(). * The scalar type enums V_INT, F_FLOAT, et al, have been renamed to V_TYPE_INT, V_TYPE_FLOAT, etc. * The interpolation enums VF_LINEAR, et al, have been renamed to V_INTERP_LINEAR, etc. * The vl_sort_inplace() function has been removed. The vl_sort() function now always performs an in-place sort. * The deprecated functions vb_vprintf() and vb_flush() have been removed. Bug fixes ========= * Now builds correctly on Solaris, using replacement for missing drem(). * The v_seed(0) call now makes the starting seed much more random. * The type-checking macros now work with C++. * Yet more Windoze fixes. ***************************************************************************** * Version 2.7 23 Feb 2006 * ***************************************************************************** Additions ========= * The deep-copy process (via v_copy()) has been enhanced with more functions: v_copy_with() and v_copy_default(). * New functions: v_combine() and v_permute(), which replace the old list-oriented functions. * New array macros for getting exact matches (va_iget_exact(), etc). * New array function: va_extrapolate(). Changes ======= * All functions prefixed with vt_ have been renamed, so that 't' is available for a new type. Old functions are still supported for now. * The vl_combine() and vl_permute() functions have been removed, since they used far too much memory. * Removed several sets of unused functions: garbage collection, catch/throw, cleanup and v_exit(). Bug fixes ========= * The v_thaw_err() function now works in all situations. * The v_hexstring() function now works properly on 64-bit machines. ***************************************************************************** * Version 2.6 21 Oct 2005 * ***************************************************************************** Additions ========= * New option parsing functions: v_option_flag(), v_option_int(), etc., which also accept a pointer to a variable to be set. As a convenience, there's also v_getargs(), which retrieves the ARGS value from the option hash. * New function: vi_copy_region(), which copies a rectangular region of an image as another image. * New functions: vl_insert() and vl_remove(), which insert/remove scalars into a list and grow/shrink the list accordingly. * New function: vl_insort(), which inserts a scalar into a list while keeping the list sorted. * New function: va_array(), which create an array from a list of values. * New function: vf_func(), which creates a function from a list of values. * New function: vf_reduce(), which removes redundant function points. * New function: v_print_address(), which toggles whether to print memory addresses in v_print(). * New parser functions: randint() and randreal(), which generate random numbers. * Parser errors now cause v_exception() to be called. * The zlib library is now included. Changes ======= * vl_push() now returns the length of the list. * The vh_getopt() function has been renamed to v_getopts(). The old version is still available, for backward compatibility. * The default for parsers is now to flag an error when referencing an undefined variable. You can turn it off using vp_error_undef(). * The parser function mod() has been renamed to fmod(), to match the C library function. * Multiple exception hook functions can now be registered. * The freeze functions of arrays, lists, functions and hashes now always print a trailing comma. The vh_freeze() function now always prints sorted hash keys. * The (undocumented) functions vh_sortprint() and vh_noprint() have been removed. Hashes are now always fully printed by vh_print(), with sorted keys. * Several debugging options have been removed due to lack of use: V_DBG_INFO, V_DBG_IO, V_DBG_LISTREFS, V_DBG_HASHREFS and V_DBG_REFS. Bug fixes ========= * The examples directory is now included in the distribution. * More Windoze fixes. ***************************************************************************** * Version 2.5 16 Feb 2005 * ***************************************************************************** Additions ========= * New function: v_freeze_file(), which freezes Vars objects to a file. * New macros: vi_read_image() and vi_write_image(), which read and write image files but guess the format from the file suffix. * New macros: vi_gray_index() and vi_rgb_index(), which return an index into image data given the image width and pixel value. * New function: vh_append(), which appends entries from a hash to another hash. * New function: vf_transform(), which applies transform functions to the X and FX values and returns the transformed function. * New function: vg_path_reachable(), which returns a sorted list of nodes reachable from a given node. * New getopts flag: V_OPT_RANGE, which accepts a numeric list spec, and a new function vl_parse_list() to parse such a spec into a list of flags. * New functions to deal with Vars internal exceptions. * New set of macros to declare and add to static vbuffers. * New set of macros to allocate and deallocate multidimensional arrays. * New macros: v_isdir(), v_islink(), V_LIMIT(). * New macro: V_PATHSEP, which is the path separator. * New macro: V_ALLOCA_FMT(), which allocates a temporary string inside of a varargs function. Changes ======= * The vb_vprintf() function is now deprecated, since it doesn't work in all cases. Bug fixes ========= * The v_tempfile() function now works on Windoze. * More Visual C++ fixes. ***************************************************************************** * Version 2.4 15 Jul 2004 * ***************************************************************************** Changes ======= * Removed obscure builtin math functions from parsers, since they were never used and aren't available on all systems. * Rearranged sources to build cleanly with Visual C++. ***************************************************************************** * Version 2.3 31 Mar 2004 * ***************************************************************************** Additions ========= * Each object that supports iteration (arrays, lists, hashes and functions) now has a check at the start of its foreach() macro loop to see if nested iteration is being done. If so, a fatal error results. * New functions: vb_copy(), vr_copy() and vt_copy_with(). Changes ======= * The v_copy() function no longer requires a temporary file. It now gives a fatal error on unknown pointer types, instead of returning NULL. The old version of v_copy() is now called v_fcopy(), which may go away in future. * Now supports 64-bit machines. Bug fixes ========= * Doing interpolation on a spline function after using vf_set_cycle() caused a crash. This is now fixed. * The byte-swap flag is no longer clobbered by deep-copy operations. ***************************************************************************** * Version 2.2 12 Mar 2004 * ***************************************************************************** Additions ========= * The parser syntax has been expanded to include boolean tests: equality, inequality, greater than, and, or, etc. * New function interpolation feature: a function can be marked 'cyclic', so that interpolation values wrap around at a certain point. The function vf_set_cycle() controls wraparound. * New vector function: vv_create_vector(), which creates a vector from explicit values. * New macro: V_STRSUB, which checks for a substring in a string. ***************************************************************************** * Version 2.1 4 Feb 2004 * ***************************************************************************** Additions ========= * New function: vl_procinfo(), which returns information about running processes. Changes ======= * The default delimiters for the list splitting functions now include the '\r' character. * The v_tempfile() function now creates temporary files in /tmp (or TMPDIR, if that is set). Bug fixes ========= * vi_get_rgb() now creates the RGB data if it doesn't exist. ***************************************************************************** * Version 2.0 10 Dec 2003 * ***************************************************************************** Additions ========= * New set of functions to deal with RGB, RGBA and grayscale images. * New functions: v_compress() and v_uncompress(), which use zlib to do data compression. * New function interpolation type: extrapolate. This is like linear, but extrapolates values that are out of range. * New function: v_tempfile(), which returns the name of a unique temporary file. * New macro: V_ALLOCA(), which allocates memory on the stack. * There's a new vars-config script, which prints the appropriate compilation and link flags for use by Makefiles. Changes ======= * Documentation is now autogenerated by Doxygen, in HTML format. The GNU Info file is discontinued. Bug fixes ========= * Functions are now updated in vf_minimum() and vf_maximum(), so that the returned values are always correct. * Matrix freeze format has been changed so that the optional size doesn't clash with reference IDs. * Fixed obscure memory bug in vl_combine(). ***************************************************************************** * Version 1.9 30 Apr 2003 * ***************************************************************************** Additions ========= * New functions: vf_differential() and vf_integral(), which numerically differentiate and integrate a function, respectively. Changes ======= * Buffers are now always flushed before reading via vb_fscan(). The function vb_flush() is now deprecated. Bug fixes ========= * A bug in the memory reallocation of matrices has been fixed. * A bug in the reporting of parser errors has been fixed. * The vr_grep() function now works as advertised, instead of matching everything. ***************************************************************************** * Version 1.8 10 Feb 2003 * ***************************************************************************** Additions ========= * New function: vb_vprintf(), which is similar to vb_printf() but prints from a va_list structure. * New function: v_memerr_hook(), which declares a memory error hook function to be called instead of the usual v_fatal(). * New macro: V_STRNEQ(), which tests for string inequality. Changes ======= * Updated to use latest autoconf/automake. * Removed dmalloc support (valgrind is much better). ***************************************************************************** * Version 1.7 23 May 2002 * ***************************************************************************** Additions ========= * New sets of functions to efficiently deal with vectors, arrays and matrices. * Two new graph functions: vg_node_list() and vg_node_links(). Bug fixes ========= * Minor efficiency fix to function interpolation. ***************************************************************************** * Version 1.6 16 May 2001 * ***************************************************************************** Additions ========= * Added support for dmalloc debugging. * Now uses libtool to support shared libraries. ***************************************************************************** * Version 1.5 27 Sep 2000 * ***************************************************************************** Additions ========= * New list function: vl_join_text(). * Freeze/thaw functions now read DOSified files. Bug fixes ========= * vs_type() now returns V_NULL if passed NULL. ***************************************************************************** * Version 1.4 26 Jun 2000 * ***************************************************************************** Additions ========= * Graphs and queues can now be frozen and thawed. * New system function: v_parse_date(). ***************************************************************************** * Version 1.3 2 Feb 2000 * ***************************************************************************** Additions ========= * Binary I/O now deals with byte-swapping across machines. * New interpolation functions: vf_get_point(), vf_delete_point(), vf_empty(), vf_points_x(), vf_points_fx(). * New copying function: v_copy(), which can make an exact copy of a nested data structure. * New hash function: vh_entry_count(). * New system function: v_lock(). * New freeze/thaw functions, which can save and restore data structures in editable ASCII format. * Now has a regression test suite. * Various extra files now distributed in the 'contrib' directory. * New hook function for fatal errors. Changes ======= * Old compatibility aliases have been removed. Bug fixes ========= * A few memory glitches have been removed. * Made v_fread() recover from errors better. * Fixed bug in v_filename() -- didn't remove the initial /. * Fixed bug in vh_values() -- wasn't copying the scalar values, but only referring to them. * Fixed bug in vf_point_count() -- wasn't updating function before return. * Fixed bug in vf_get_range() -- returned maximum value was the same as the minimum value. * Fixed bug in vl_search(), when the exact-match flag is set (returned V_NOTFOUND, instead of an exact match). * Fixed bug in vf_value_spline() -- wasn't always initialising the spline data. * Debugging I/O output for variables is now triggered by V_DBG_IO, instead of V_DBG_INFO (like it should've been). ***************************************************************************** * Version 1.2 21 Apr 1999 * ***************************************************************************** Changes ======= * Vars binary data file format now supports more than 32768 entries. * Changed v_read_with() to v_open_with(), which uses regexps instead of suffixes. * vs_sgetref() now returns empty string when passed NULL, so that other macros can work properly. * vl_get() now doesn't create intermediate 'undef' values when getting out-of-range entries. Bug fixes ========= * vl_splice() bug fixed, stopping spurious 'undef' entries being appended to lists. ***************************************************************************** * Version 1.1 27 Jan 1999 * ***************************************************************************** Additions ========= * New interpolation functions, with linear, Lagrange and spline interpolation supported. * New system function: v_test(). * New parser function: vp_error_undef(). * New graph functions: vg_path_length(), vg_path_exists(), vg_path_cache(), vg_use_cache(), vg_path_info(), vg_caching(). Renamed vg_find_path() to vg_path_list(). * New scalar function: vs_sstore_len(). * Library now tries to free() all its internally malloc()ed memory, so that memory monitoring utilities (e.g. dmalloc) don't report spurious things. Changes ======= * Removed GA stuff -- unused, and it doesn't really work properly. * Removed drem() from parser functions. Solaris hasn't got it. * Now uses GNU autoconf/automake/libtool for installation. Bug fixes ========= * Fixed bug in vp_eval() -- strings with no final newline gave parse errors. * Fixed bug in vg_tsort() -- cycle check didn't work properly. * Fixed bug in vl_reverse() -- wasn't reversing the list! * Fixed bugs in vl_match() and vl_reverse() -- wasn't copying the scalar values. * Fixed bug in v_usage() -- core dumped if no options were declared. * Fixed RE_DUP_MAX duplication problem in FreeBSD. * Fixed memory leak in vl_destroy(). * Fixed bug in vl_split_string() -- was modifying possible read-only string argument. ***************************************************************************** * Version 1.0 11 Jun 1998 * ***************************************************************************** Initial version.