-*- mode: text; mode: fold -*- Changes since 2.2.2 1. src/sltermin.c: Added support for native terminfo binary layouts. Some systems have binary terminfo files that are incompatible with the standard ncurses layout. Use the --terminfo=layout configure option to specify a non-standard layout (hpux11, osf1r5, uwin, aix4, default). This incompatibity was pointed out by River Tarnell. 2. src/slparse.c: complicated lvalue expressions were not being properly parsed. 3. src/slstrops.c: Added strskipbytes function. 4. doc/tm/rtl/*.tm: A number of typos were corrected. (Agathoklis D. Hatzimanikas) 5. src/slang.c,slparse.c: Qualifiers were not being passed to functions called via derefencing an array of function references, e.g., (@f[n])(args;q). 6. src/slparse.c: Flag attempts to call literals as functions. 7. slsh/lib/process.sl: Added a "dir" qualifier to the new_process function. This allows the subprocess to be started in a specified directory. 8. src/slrline.c: Added rline_get_last_key_function, which returns the last slang readline key function. 9. */Makefile.in: Commmened out "DESTDIR=" lines (Marcel Telka). 10. slsh/lib/rline.sl: Added rline_edit_history (allows the history to be edited in an external editor) and rline_up/down_hist functions. 11. src/slparse.c: An incorrect check (< instead of <=) was causing -0 to generate an error. 12. .../tm/*: Corrected some documentation typos and spelling errors (Agathoklis D. Hatzimanikas). 13. doc/tm/rtl/misc.tm: Documented the __tmp function and corrected a few more documentation typos (Agathoklis D. Hatzimanikas). 14. src/slerrno.c: ELOOP was defined twice (Agathoklis D. Hatzimanikas). 15. doc/tm/slang.tm: Fixed a few doc errors noticed by Manfred Hanke. 16. src/slsh/scripts/mv: removed redundant call to rename, and added force, noclobber, and verbose options (Agathoklis D. Hatzimanikas). 17. src/slsh/scripts/*: changed "static" to "private". 18. src/sldisply.c: Underlined space characters were not appearing with the underline. 19. src/sldisply.c: Do not rely upon terminals that can background-color-erase (BCE) to erase using the monochrome attributes (e.g., underline). 20. src/slarith.c: Tweaked the %S format to better round decimals with repeated 9s or 0s. 21. autoconf/mkinsdir.sh: Updated to a newer version of mkinstalldirs. 22. src/slagetput.c: Change 2.2.2-10 fixed a problem with aget. The same change needed to be made to aput to avoid an access violation. 23. modules/pcre-module.c: Added support for binary strings (Paul Boekholt). 24. src/slposdir.c: Added utime function. 25. slsh/scripts/mv: Added a missing call to stat_file (Agathoklis Hatzimanikas). 26. src/sldisply.c: Moved the keypad init/deinit code to separate functions for more fine-grained control. 27. slsh/rline/editor.sl: Added rline_call_editor and rline_edit_line functions 28. src/slbstr.c: Added is_substrbytes function. 29. doc/tm/rtl/strops.tm: The strncmp example used strcmp function (Brian Murray). 30. src/sltermin.c: Changed the search order for terminfo files to: $TERMINFO, $HOME/.terminfo, /usr/local/{etc,share,lib}/terminfo, /etc/terminfo, ... 31. src/slparse.c: Change #6 triggered an invalid parse error for statements involving foreach-using such as: foreach x (y) using ("bar") (@foo)(); 32. src/slstrops.c: Added an alternative interface to strreplace that facilitates the most common case where one wants to replace all substrings. The function now supports new = strreplace (a, b, c); in addition to the older usage: (new,m) = strreplace (a, b, c, n); 33. src/sltoken.c,...: Added support for binary integer literals of the form 0b010101. Integers may be formatted as unsigned binary using the %B format specifier, e.g., sprintf ("%B", 5) ==> "101" sprintf ("%#B", 5) ==> "0b101" sprintf ("%#8B", 5) ==> " 0b101" sprintf ("%#.8B", 5) ==> "0b00000101" sprintf ("%#12.8B", 5) ==> " 0b00000101" 34. src/slarith.c: ullong_to_binary was not getting defined on systems where sizeof(long)==sizeof(long long). (Mark Olesen). 35. src/slsh.c: The stat_mode_to_string function was using 'f' unstead of 'p' for FIFOs. (Agathoklis Hatzimanikas). 36. src/slarray.c: Switched to using mergesort instead of qsort and added support for sorting non-array types. For details, see the updated documentation for array_sort. 37. src/slarray.c: Reduced the memory requirments for the mergesort function, which produced a 5% speed improvement. 38. src/slarray.c: Added support for qsort to array_sort. See the updated documentation for details. 39. src/slparse.c: Added a syntax enhancement to structs and qualifiers to allow the fields of structure-valued expressions to be used to define the structure. For example: space = struct {x, y, z}; spacetime = struct {@space, t}; Here spacetime is a structure containing 4 fields: (x,y,z,t). In this context, @ is not a dereference operator. Rather it is used to tell the parser that the following expression is a structure valued. 40. src/slcommon.c: SLmalloc inherited malloc's undefined behavior when 0 bytes were requested. The change will cause SLmalloc to allocate at least 1 byte if the OS version of malloc returns NULL for 0 byte sizes. 41. src/slclass.c: The default dereference method for all scalar and vector classes was changed from undefined to duplicate. That is, @7 will produce 7 instead of triggering a method-undefined exception. 42. src/slwclut.c: Added \x\c\p\,\g character classes to strtrans (See strtrans doc). 43. src/*.c: Made numerous int->SLindex changes to match function prototypes. Note that SLindex_Type is currently typedef'd to be an int, but if that ever changes, these changes will be necessary. I also added SLang_push_array_index to the public API. Also updated copyright year since a number of files changed. 44. src/slarrfun.c: change 43 would not compile on 64 bit systems. 45. src/slnspace.c: the apropos function was not returning float, short, long, and long long constants. 46. src/slarith.c: If LLONG_MAX is not defined, and sizeof(long long) is 64 bits, then use the standard value. 47. src/slang.c: long long constants were not working. 48. slsh/lib/process.sl: modes[i] was being set after i was bumped. This caused modes[0] to be NULL. 49. slsh/lib/slshrl.sl: If the first word is callable, and is followed by a ',', then add parenthesis, i.e., "print,7" ==> "print(7);". Note: this is a commandline convenience feature and has nothing to do with the slang syntax. 50. slsh/lib/rline/complete.sl: Attempt to complete structure field names. 51. src/slrline.c,slsmg.c,sldisply.c: Added support for multiline readline. 52. configure,src/*.hin: Added autoconf support for size_t. 53. src/slang.h,...: Added 'typedef unsigned in SLstrlen_Type' to create migration path for size_t in place of unsigned int. 54. src/slstrops.c: New intrinsics: islower, isupper, isxdigit, isalnum, isalpha, iscntrl, isprint, isgraph, ispunct, isblank, isspace, strskipchar, strbskipchar The latter two functions play a role in the context of the variable length UTF-8 encoding encoding analogous to that of ch=*s++ and ch=*s-- in a fixed encoding. 55. slsh/lib/rline/editfuns.sl: Used functios in change #54 to implement bskip_word and skip_word readline functions. 56. src/slstrops.c: Added isascii, and updated docs. 57. src/sldisply.c: _pSLtt_cmdline_mode_reset will also clear to the end of the screen. 58. mingw32 compilation problems: typo in src/slconfig.h; src/slarrfun.c: missing '#ifdef HAVE_LONG_LONG'. 59. src/slsmg.c: Change #51 introduced a bug that manifests itself when expanding a tab at the right edge of the display. 60. src/slarrfunc.c: If contracting an empty array over all dimensions to produce a scalar, clear the transfer buffer. 61. src/slarrfun.c: If a scalar is passed to array_reverse, then do nothing. 62. src/slarith.c: LONG_MIN/MAX values were placed in an integer contant table instead of a long integer table. SLadd_lconstant_table added to the interface. 63. src/slsmg.c: Change 51 introduced a bug in SLsmg_write_chars when SLsmg_Newline_Behavior != SLSMG_NEWLINE_IGNORED. 64. autoconf/config.sub+config.guess updated. 65. src/slstrops.c: If a delimiter is not passed to strjoin, assume the empty string. 66. modules/test/test_rand.sl: Some integer constants changed to unsigned values. 67. src/slstruct.c: tweak code to remove a false uninitialized variable warning. 68. src/slarray.c: fix NULL pointer deref from invalid binary operation Array_Type[N]+[1:N]. 69. src/slang.c: '>' instead of '<' should have been used in in the try/catch code when decrementing the frame pointer. 70. src/slparse.c: Method qualifiers were getting lost when called from the constructor, e.g., new_object(arg1;qual1).method(arg;qual2) 71. src/sltoken.c: preprocessor statements #if, #ifeval, and #ifexists will use the (non-anonymous) namespace of the file containing the statements. 72. src/slang.c: _pSLlocate_name return NULL instead of an exception if the name contains a non-existent namespace. 73. Removed excess whitespace from all files (*.c, *.h, *.tm, *.sl, ...). 74. src/slang.c: define MAX_USER_BLOCKS to be 5, and use it instead of `5'. 75. src/slsignal.c: Use (char*)NULL instead of NULL in call to execl to avoid a compiler warning on OpenBSD. 76. src/slproc.c: define _XOPEN_SOURCE_EXTENDED to be 1 instead of just defining it. This pulls in some prototypes on OpenBSD. 77. src/slmath.c: The hypot intrinsic was modified to work with N arrays instead of just 2. (Manfred Hanke) 78. src/slarith.inc: Use doubles for intermediate calculations when double is the expected result. This avoids some integer overflows (Matthias Kühnel, Michael Wille, Manfred Hanke). 79. src/slparse.c,slang.c: Added FOREACH_EARGS byte-code that will implicitly call the __eargs function. This avoids a problem with the standard FOREACH bytecode if a hook gets called after __eargs but before the FOREACH byte-code executes. 80. src/slstrops.c: The pos argument to the string_match and string_matches function was made optional (defaults to 1). 81. src/slstring.c: Use _pSLuint32_Type instead of unsigned long for hashes since the hash algorithm was designed for 32 bits. 82. src/slstd.c: Save the pointer passed to putenv to a global array so that leak checkers can find it. The reason for this is that some libc implementations copy the pointer but others do not. 83. src/slang.c: An off-by-one error was causing a stackunderflow error when handling a exception list in a try-catch statement. 84. slsh/lib/arrayfuns.sl: Add support for empty arrays to the shift function (Manfred Hanke). 85. */examples/*.sl: Various updates and corrections (Manfred Hanke). 86. src/sllist.c: A extra call to SLang_free_mmt was causing a list to be freed when set via an index array. 87. src/slstrops.c: Vectorized strlow/strup intrinsics. 88. src/slmath.c: Add support for more than 2 arguments to the _min/_max functions (Manfred Hanke). 89. src/sllist.c: Added list_join, list_concat intrinsics (Mike Noble). 90. slsh/lib/setfuns.sl: adds unique, intersection, complement, union 91. modules/csv.sl: Added a module to support the reading and writing of comma separated values (csv) formatted files. 92. Some documentation corrections (Manfred Hanke). 93. src/slmath.c: In the hypot function, use the convenience function do_binary_function_on_nargs instead of an explicit loop. (Manfred Hanke). 94. modules/tm/slsmg.tm: Manfred Hanke has started documenting the slsmg module. He also provided a new example (slsmgex2.sl). 95. src/slnspace.c,slang.c: Free up some memory associated with namespaces upon exit. 96. src/slposio.c: added ttyname intrinsic 97. autoconf/slang.pc: Use @libdir@ instead of assuming $prefix/lib. 98. modules/csv.sl: The read_cols method allows the type qualifier to be a string of type specifiers, e.g., types="liff". This is equivalent to types=['l', 'i', 'f', 'f']. 99. src/sltime.c: Added timegm, which is the inverse of gmtime. I also made changes to the time functions so that time_t is not assumed to be a long. This means that _time may produce a longlong integer on some platforms. 100. modules/cmaps/coolwarm.map: A color map by Kenneth Moreland. 101. modules/png-module.c: Use png_set_expand_gray_1_2_4_to_8 instead of png_set_gray_1_2_4_to_8 if available (patch forwarded from Marco Atzeri). 102. src/slcommon.c: Code using __libc_enable_secure was removed (patch forwarded from Marco Atzeri) 103. src/sldisply.c: Added some termcap compatibility functions that were ifdefed out in v2.2.2 but were made available by some linux distributions for code to use: SLtt_tgetent, SLtt_tgoto, SLtt_tputs (patch forwarded by Marco Atzeri). 104. autoconf/aclocal.m4,configure.ac: Various updates by Marco Atzeri including a cygwin specific change. 105. autoconf/aclocal.m4: Missing hyphen for ELFLIB_MAJOR on cygin (Marco Atzeri). 106. slsh/lib/doc/tm/setfuns.tm: Add newlines to the note1 macro (Manfred Hanke). 107. src/slang.c: change #5 caused a problem evaluating the bytecode produced by preparsed files (.slc) produced by slang v2.2.2. 108. modules/tm/csvfuns.tm: Documentation updates 109. src/sldisply.c: slsh would exit if the underlying terminal was unknown because _pSLtt_init_cmdline_mode was returning a fatal error. 110. configure, *Makefile.in,etc: Made changes so that ARCH environment variable influences where the .o files are placed. The INSTALL.unx file documented this feature but the slsh and modules Makefiles did not implement this. 111. */mkfiles/makefile.all: Added WFLAGS to mingw sections to allow the warning flags to be specified independently of the CFLAGS. 112. src/slang.c,_slang.h: Changed `#if HAVE_LONG_LONG' to `#ifdef HAVE_LONG_LONG' in a few places. 113. src/slstrops.c: A number of string functions have been vectorized to work on arrays of strings. These include: is_substr str_delete_chars strbytelen strcharlen strcmp strcompress strlen strlow strnbytecmp strncharcmp strncmp strtrans strtrim strtrim_beg strtrim_end strup 114. modules/Makefile.in: Change #110 introduced a bug that caused the modules to always be need rebuilding. 115. src/sltoken.c: Change #if HAVE_LONG_LONG to #ifdef HAVE_LONG_LONG. 116. src/slmath.c: Tweaked the Kahan sum for the hypot function. 117. slsh/readline.c: Added __rline_init/reset_tty functions and used them in the rline editor routines to reset the terminal before calling an external editor. This avoids problems when the editor is subsequently suspended. 118. modules/csv.sl: Typo causing a bug involving the mapping of string valued column-specifiers to column numbers by csv.readcol. (Paul Boekholt) 119. doc/tm/rtl/strops.tm: Typo in sprintf documentation (Andras Irrgang). 120. src/sltime.c,slposio.c: Avoid certain posix *_r functions if _POSIX_C_SOURCE is too old.