Changes since 1.2.1 1. slcmd.c was not parsing characters in single quotes correctly, e.g., 'a'. Changes since 1.2.0 1. Oops. A NULL pointer could be referenced in slcmd.c. Changes since 1.0.3 beta -1. The SLKeyMap_List_Type structure has been modified to allow the name of the keymap be be an arbitrary length. Unfortunately, this change breaks backward compatibility. So, if you have programs ^^^^^^^^^^^^^^^^^^^^ that are dynamically linked to previous BETA versions of 1.0, you ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ will have to recompile those applications!!! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 0. The variable SLsmg_Newline_Moves has been renamed to SLsmg_Newline_Behavior with the following interpretation: #define SLSMG_NEWLINE_IGNORED 0 /* default */ #define SLSMG_NEWLINE_MOVES 1 /* moves to next line, column 0 */ #define SLSMG_NEWLINE_SCROLLS 2 /* moves but scrolls at bottom of screen */ #define SLSMG_NEWLINE_PRINTABLE 3 /* prints as ^J */ 1. Added patches from Joao Luis Fonseca <joaolf@centroin.com.br> to src/mkfiles/makefile.all and a necessary OS/2 specific declaration to slvideo.c. I also added the Watcom patches from Bill McCarthy <WJMc@pobox.com> to makefile.all. 2. The terminfo code is now aware of the complete set of terminfo definitions. However, the screen management routines support a small subset. (Eric W. Biederman <ebiederm+eric@npwt.net>). 3. Improvements to the SLsmg scrolling alogorithm. 4. SLang_process_keystring and SLang_make_keystring now return NULL upon failure. 5. SLcomplex_sqrt branch cut modifed to be consistent with FORTRAN. 6. If the system supports vsnprintf and snprintf, they are used. The assumption is that they return EOF upon failure. My linux man page for these functions have conflicting statements regarding this. 7. Simplified handling of memory managed types. Now it is possible to pass the managed object directly to the intrinsic function. See slfile.c for an explicit example of this technique. Similarly, references may also be passed and the function SLang_assign_to_ref may be used to assign values to the referenced object. This is also illustrated in slfile.c. 8. QNX specific tweak to slfile.c from Pavanas Abludo Incusus <pavanas@ccia.com>. 9. Fixed a problem where, e.g., x = Double_Type [7,8,9]; y = x[0,[:],[:]]; returned y = Double_Type[8*9] instead of the more intuitive result Double_Type[8,9]; 10. SLcmd_Cmd_Table_Type structure changed to permit an unlimited number of arguments. The changed should be backward compatible except that a recompilation of the application will be necessary. 11. New SLsmg function: SLsmg_set_color_in_region may be used to set the color of a specified region. See demo/smgtest.c for an example of how this is used. Another use would be to draw shadows around a box. 12. OS2 ICC patches from Eddie Penninkhof <eddie.penninkhof@tip.nl>. 13. Grammar tweaked to make the pow (^) operator postfix-unary. This makes more sense mathematically so that: a^b^c ==> a^(b^c); -(a)^b ==> -(a^b); 14. New struct specific intrinsics: get_struct_field_names get_struct_field_value _push_struct_field_values See function reference for more information on these. Changes since 1.0.2 beta 0. SLtt_init_video, SLtt_reset_video, SLsmg_resume_smg, SLsmg_suspend_smg have been modifed to return 0 upon success, or -1 upon error. 1. Configure script modified to report slang version as 1.0.x instead of 1.0.0x. 2. Bug fix involving automatic detection of color (Unix) 3. slvideo.c bug fixed (WIN32, Thanks Chin Huang <cthuang@vex.net>) 4. Slsignal modified so that fork is not used for CYGWIN32, suggested by vischne@ibm.net. 5. Solaris ELF patches integrated into configure.in. Now ELF support is available for Linux and Solaris. Thanks Jan Hlavacek <lahvak@math.ohio-state.edu>. 6. The library now works with MING32 and should work with CYGWIN as well. See INSTALL.pc and src/mkfiles/README for more information. Do NOT use the configure script under these environments. 7. A new IBMPC_SYSTEM function added that affects WIN32, MSDOS, and OS/2 systems: SLang_getkey_map_to_ansi (int enable); If `enable' is non-zero, arrow and function keys will be mapped to the ansi equivalents. 8. The WIN32 terminal support has been modified to be more consistent with the other platforms. In particular, mouse button press reporting has been added (SLtt_set_mouse_mode), and bright color support appears to have been fixed. Note: For MINGW32 and CYGWIN32, use src/mkfiles/makefile.all. Do not use the Unix configure script because WIN32 is NOT Unix. 9. Several changes to slvideo.c that deals with the proper use of the scroll region for DOS/Windows type systems. 10. demo/smgtest.c has been enhanced. 11. Some cleanup performed to src/slprepr.c 12. WIN32 and WIN16 preprocessing symbols are defined when appropriate. Changes since 1.0.1 beta 1. More VMS patches. Thanks Andy. Changes since 1.0.0 beta 1. Fixed a bug in the automatic detection of color terminal 2. Patches to get it to compile on OS2 and VMS 3. Replaced \r\n in slarray.c with \n Changes since 0.99-38 0. Many, many changes to the interpreter. See documentation. 1. SLang_free_intrinsic_user_object shortened via define on VMS. 2. Make sure slang.h does not defined REAL_UNIX_SYSTEM on OS/2. 3. New search paths for termin directories include $HOME/.terminfo and /usr/share/terminfo. 4. SLsystem function added. This is a replacement for `system'. It implements POSIX semantics for POSIX systems. Although Linux claims to be a POSIX system, it's `system' routine is broken. 5. color names color0 ... color7, brightcolor0, ... brightcolor7 added for Unix and VMS systems. Changes since 0.99-37 1. SLang_input_pending returns -1 if Ctrl-Break pressed (DOS specific). 2. SLtty_VMS_Ctrl_Y_Hook added for Ctrl-Y trapping. Keep in mind that this is called from an AST. 3. Documentation updates 4. Fixed bug dealing with keymaps with escape sequences involving characters with the high bit set. 5. slkeypad code ported to DOS 6. SLsmg_write_raw and SLsmg_read_raw functions added. 7. Compilation error under QNX fixed. 9. Small change involving SLang_flush_input. Changes since 0.99-36 1. Oops fixed a bug in alternate character set handling when SLtt_Use_Blink_For_ACS is set. This bug only affected DOSEMU. 2. slvideo.c modification that affects DJGPP version of library. Now the screen is saved and restored. 3. Updates to slcurses.c by Michael Elkins. 4. If a color called `default' is specified, the escape sequence to set the default color will be sent. Be careful, not all terminals support this feature. If your terminal supports it, e.g., rxvt, then using setenv COLORFGBG default is a good choice. Changes since 0.99-35 1. Fixed alt char set bug introduced in 0.99-35. 2. New intrinsic: _stk_reverse 3. New demos: keypad, smgtest, pager 4. The environment variable COLORFGBG may be used to specify default foreground background colors, e.g., in csh use: setenv COLORFGBG "white;black" to specify white on black as the default colors. This also means that a color name of NULL or the empty string "" will get mapped to the default color. 5. Improved curses emulation provided by Michael Elkins (me@muddcs.cs.hmc.edu). 6. Small bug fix to SLang_flush_output provided by Balakrishnan k <MDSAAA27@giasmd01.vsnl.net.in>. 7. Updated some documentation in doc/cslang.tex (Gasp). 8. Update vmsmake.com file provided by Martin P.J. Zinser (m.zinser@gsi.de). Changes since 0.99-34 0. OS/2 video problem solved by Rob Biggar (rb14@cornell.edu). 1. The way the interpreter internally handles strings has changed. This should not affect programs which utilize the library. Now all strings returned by the function SLang_pop_string should be freed after use. The SLang_pop_string function will always set the value of the second parameter passed to it to a non-zero value. For this reason, programs should use the new function SLpop_string and always free the string returned by it after use. 2. If SL_RLINE_NO_ECHO bit is set in the readline structure, the user response will not be echoed. 3. If terminal is xterm, the TERMCAP environment variable will be ignored. This change was necessary because of the braindead TERMCAP setting created by the latest version xterm. 4. Some of the keymap routines were re-coded. Now it is possible to have lowercase characters as part of the prefix character sequence. 5. New modules. See demo/pager.c for information. See also the slrn source code for a more sophisticated use. SLscroll: may be useful for routines that deal with displaying linked lists of lines. SLsignal: POSIX signal interface for programs that use SLsmg and SLtt modules. doc/signal.txt may also prove useful. SLkeypad: Simplified interface to SLang keymaps. SLerrno: System independ errno routines Changes since 0.99-33 1. A couple of interpreter bug fixes. 2. Some macros, e.g., MEMSET, removed from slang.h. I do not feel that they belong there and it is unlikely that they are used by others. I made them avalable in the file src/jdmacros.h for anyone whose code depends on them. 3. The functions jed_mem??? have been renamed to SLmem???. 4. New intrinsic: _obj_type returns type information about object on top of stack. Changes since 0.99-32 1. appropriate header files added for VMS 2. Oops. 0.99-32 introduced a bug positioning cursor. :( Changes since 0.99-31 1. Simple minded curses emulation added. This should help those migrating from curses. See slang/src/curses/*.c for sample curses demo programs that the SLsmg routines can handle. See also slang/src/slcurses.c for some wrapper functions. 2. Changed <config.h> to "config.h" in all source files. 3. If system lacks terminfo directories, it is compiled with termcap support. This generalizes and replaces the test for NeXT. 4. New functions for slang/src/sldisply.c: void SLtt_get_screen_size (void); SLtt_Char_Type SLtt_get_color_object (int); void SLtt_set_color_fgbg (int, SLtt_Char_Type, SLtt_Char_Type); The first function attempts to deduce the correct values of SLtt_Screen_Rows and SLtt_Screen_Cols. This function is called by sltt_get_terminfo. New constants such as SLSMG_COLOR_BLACK, SLSMG_COLOR_RED, ... have been added to slang.h to facilitate the use of SLtt_set_color_fgbg. 5. Improved error messages 6. ELF support. Do: make elf; make install-elf Changes since 0.99.30 1. Small bug fixed that affects 64 bit machines with a certain byte ordering. 2. slutty.c: _POSIX_VDISABLE is used if defined. Changes since 0.99.29 0. BIG change in handling keymaps. Specifically, this change effects the change of the `f' field of the SLang_Key_Type structure. Before, this was VOID_STAR, now it is a union. The new change is much more portable. In addition, the function `SLang_define_key1' has been removed and replaced by `SLkm_define_key'. See src/slrline.c for the use of this new interface. For a short time, the old interface will be available if the preprocessor symbol `SLKEYMAP_OBSOLETE' is defined when slang is compiled. See jed and slrn source for more examples. 1. SLang_getkey now reads from /dev/tty (unix). 2. If the first argument to SLang_init_tty is -1, the current value of the interrupt character will not be changed (unix). 3. New intrinsic: time Changes since 0.99.28 1. Oops! Horrible bug in src/slmemcmp fixed. 2. slvideo: init_video modified to be more consistent with VMS/Unix routine. Changes since 0.99.27 1. More changes to the configure script 2. It looks like hpterm support is in place. This terminal has a glitch that prevents efficient screen updating. 3. New SLsmg function: void SLsmg_write_color_chars (unsigned short *s, unsigned int len) This function may be used to write a string of characters with attributes. Changes since 0.99.26 1. Slang now uses a configure script under Unix to configure itself. 2. New intrinsic functions include _stk_roll, strchop, strchopr. 3. Terminals which require an escape sequence to make their arrow keys work are now sent the escape sequence. Changes since 0.99.25 1. New SLsmg variables: SLsmg_Newline_Moves SLsmg_Backspace_Moves These variables control the interpretation of newline and backspace characters in smg. Changes since 0.99.24 1. SLSMG_RTEE_CHAR, etc... added to OS/2 part of slang.h 2. Small fix for aix-term Changes since 0.99.23 0. The makefile for unix has been completely re-written. 1. Some problems dealing with certain color terminals have been resolved. 2. `g' generic type added to SLcmd. Changes since 0.99.22 0. The Macro `VOID' has been removed. The whole point of this macro was to mimick `void *' declarations for compilers that did not support such a construct. Instead of `VOID *', slang.h now defines `VOID_STAR' and all `VOID *' declarations have been renamed to `VOID_STAR'. If you use the VOID macro in your application, you have two choices: 1. Rename all occurances of VOID * to VOID_STAR 2. Add: #define VOID void somewhere appropriate. 1. \< and \> regular expressions added. Changes since 0.99.21 1. Oops. I added too much linux stuff (see 3 below). Some of it backed out to Linux only. Changes since 0.99.20 1. Problem on some VMS systems which lack prototype for atof fixed. 2. New function: SLtt_set_mouse_mode. This is used to turn on/off mouse reporting on Unix and VMS systems. 3. The terminal type `linux' is now recognized by the SLtt interface--- even if there is no termcap/terminfo entry for it. Changes since 0.99.19 1. User definable types must now have object identification numbers larger than 127. The lower limit used to be 100 but this comflicts with many applications (as well as slang itself) using lower case letters as the object number, e.g., create_array ('s', 10, 1); which creates an array of 10 strings (object number 's' = 115). 2. New intrinsic: array_info available. 3. regular expression matching bug involving \{m,n\} expressions fixed. 4. New module: slprepr.c. This gives programs the ability to use the slang preprocessor. 5. News slsmg functions: SLsmg_suspend_smg () and SLsmg_resume_smg (). These are designed to be used before and after suspension. The SLsmg state is remembered and a redraw is performed by the resume_smg function. 6. The function `sltty_set_suspend_state' is now available for Unix systems. It may be used to turn on/off processing of the suspend character by the terminal driver. 7. If SLtt_Try_Termcap is 0, the TERMCAP variable will not be parsed. 8. SLang_TT_Read_FD variable is now available for unix. This is the file descriptor used by SLang_getkey. 9. New preprocessor symbols available: SLMATH : If math functions are available SLUNIX : If unix system calls are available SLFILES : Stdio functions available FLOAT_TYPE : Floating point version Changes since 0.99.18 1. New intrinsic function: strcompress. This collapses a string by removing repeated characters. For example, define collapse (f) { while (str_replace (f, " ", ",")) f = (); return strcompress (f, ","); } collapse (", ,a b c ,,,d e,f "); returns: "a,b,c,d,e,f" 2. QNX support added. 3. New Functions (unix only): SLtt_tgetstr, SLtt_tgetnum, SLtt_tgetflag. 4. Fixed parsing of Octal and Hex numbers so that incorrect values are flagged as errors. Also, both lower and uppercase values may be used in HEX numbers, e.g., 0xa == 0XA == 0Xa == 0xA. 5. MS-Windows support added. Compile using makefile.msw. This creates `wslang.lib'. 6. New SLsmg functions: SLsmg_get_row, SLsmg_get_column. These return the current position. Changes since 0.99.17 1. I have added limited termcap support although slang is still a terminfo based system. The support is provided via the TERMCAP environment variable. If this variable exists and contains a termcap entry for which there is no reference to another entry (via tc field), it will be used to setup the terminal. If the TERMCAP variable does not exist, or it refers to a file, terminfo is used instead. This is not really a limitation since one can set this variable in a way that slang likes by using `tset -s'. The motivation for this support is two-fold: a. Slang programs can now run inside the screen program which sets the TERMCAP variable appropriately. b. A user can now correct defective termcap entries (e.g., for Linux), and have those corrections made available to slang via the `tset' command, e.g., by putting something analogous to: setenv TERMCAP /corrected/termcap/file/absolute/path/name eval `tset -s terminal-name` in the .login file. c. This also means that I can distribute corrected termcap entries for common terminals. Changes since 0.99.16 1. Inadequate terminfo entries for `linux' terminal are compensated for. 2. Terminals with the ``Magic cookie glitch'' are flagged as having an unusable highlighting mode. changes since 0.99.15 1. Better checking of parameters passed to search routines. 2. Problem with line drawing characters fixed. changes since 0.99.14 1. Ran code through purify. Fixed one problem reported in slkeymap.c 2. Fixed a bug in sldisply.c regarding mono-attributes. 3. Code ready for ELF changes since 0.99.13 1. SLtt_Has_Alt_Charset variable added to xterm.c. This is motivated by the sad, pathetic fact that although some termcap/terminfo databases suggest that the terminal can do line drawing characters, the terminal cannot. 2. SLsmg_write_nstring function added. This function may be used to write only n characters of a string padding wit hblanks if necessary. 3. If the environment variable COLORTERM exist, SLtt_get_terminfo will set SLtt_Use_Ansi_Colors to 1. 4. Sltt_set_cursor_visibility function added. If passed a zero integer value, the cursor is hidden; otherwise, it is made visible. changes since 0.99.12 1. SLsmg now uses the `te' and `ti' termcap entries if present. Apparantly some terminals need to be put in cursor addressing mode. This also has the effect of restoring the screen of the xterm to what it was before the program was executed. 2. For some types of code, slang is 20% faster! This is especially noticeable for branching constructs inside tight loops or recursive functions. changes since 0.99.10 1. New version control added: A new preprocessor symbol was added: SLANG_VERSION This is a 6 digit integer of the form: abcdef This corresponds to version number ab.cd.ef. So for version 0.99.11: #define SLANG_VERSION 9911 In addition, the intrinsic variable `SLang_Version' was changed from a string to an integer that has the value SLANG_VERSION. This also implies that the interpreter variable _slang_version is now an integer. changes since 0.99.9 1. The terminfo code failed to recognize the automatic margin flag. This has been corrected. In addition, the display code nolonger resets the character set upon initialization. This is considered to be a good thing. 2. There is a new program in slang/doc called `texconv' that will produce a nicely formatted ascii document from the tex formatted ones. In addition, new documentation has been added: slang.tex which describes the syntax of the slang programming language and cslang.tex which describes the C interface to the library. The latter document is far from complete but it is a start. 3. A new variable declaration keyword has beed added: global_variable This keyword is useful for declaring global variables from within functions. Such a feature simplifies some scripts. 4. The SLsmg line drawing functions are now in place. changes since 0.99.8 1. \d may now be used in regular expressions to specify a digit. In addition, \e specifies an escape character. So for example, `\e\[\d;\dH' matches an ANSI cursor position escape sequence. 2. Small bug in dealing with terminals that have automatic margins has been fixed. 3. When compiled with -DSLANG_TERMINFO will use terminfo. This means that there is no need to link to termcap. changes since 0.99.7 1. New function added to the readline package: int SLang_rline_insert (char *s); this may be used to stuff strings into the rline buffer. SLSC exploits this feature. changes since 0.99.6 1. ALL macros beginning with LANG have been changed to use SLANG as the prefix. For example, the macro LANG_IVARIABLE has been renamed to SLANG_IVARIABLE. If you have used one of these macros, please make the change. 2. Application defined types. See demo/complex.c for an example that defines complex numbers and overloads the binary and unary operators to work with them. changes since 0.99.5 1. New interface for application defined objects. Functions include: extern SLuser_Object_Type *SLang_pop_user_object (unsigned char); extern void SLang_free_user_object (SLuser_Object_Type *); extern void SLang_push_user_object (SLuser_Object_Type *); extern SLuser_Object_Type *SLang_create_user_object (unsigned char type); This means that S-Lang scripts do not have to worry about freeing structures, arrays, etc... A consequence of this fact is that the intrinsic function `free_array' has been removed. See examples of this exciting new feature in slang/demo. 2. Better documentation and examples. See slang/doc/*.* as well as examples in slang/demo. 3. Memory allocation macros have changed from MALLOC to SLMALLOC, etc... Applications are encouraged to use these rather than `malloc' because by compiling your application AND the slang library with the -DMALLOC_DEBUG will link in code that checks if you have corrupted memory, freed something twice, etc... Use the function `SLmalloc_dump_statistics' for a report of memory consumption by your program. changes since 0.99.4 1. cleaned up the source some and I changed the names of the hooks user_whatever to `SLang_User_Whatever'. This makes them more consistent with other external functions and variables and helps avoid name space pollution. changes since 0.99.3 * added screen management stuff * added a new help file reader (see help directory) * DOUBLE precision is now the default. I think that this makes more sense for an interpreted langauge. * searching routines added. changes since 0.99.2 * added low level tty support for VMS, DOS, and Unix * slang readline added * keymap support * files restructured so that programs can link, say, the readline library and not get the whole interpreter linked in. changes since 0.99.1 * obscure bug in regular expression fixed * optimizing performed for 10% speed increase in speed for some language constructs changes since 0.99.0 * semantics of the `switch' statement changed to be more C-like with the addition of the `case' keyword. For example, one can write: switch (ch) { case 'A': something (); } { case 'B': something_else (); } { case 3.14: print ("Almost PI"); } { case "hello": print ("hi"); } Note that one may mix data types without the possibility of a type mismatch error. changes since 0.98: * matrix package added. Currently only matrix multiplication and addition is supported. More functions will be added (determinants, inverse, etc..) This support is provided by the `init_SLmatrix ()' call. This support provides the following S-Lang intrinsics: matrix_multiply, matrix_add * New S-Lang core intrinsic: copy_array : copys the contents of one array to another changes since 0.97: * Double precision floating point supported. Use the -DFLOAT_TYPE -DUSE_DOUBLE compiler flags to enable this. Note that S-Lang does not support single precision and double precision floating point number SIMULTANEOUSLY. You must choose one or the other and stick with it! * Byte compiling is now more than simple preprocessing. This results in about a 20% decrease in loading time. This also means that if you rebuild your application, you MUST re-bytecompile. * New syntax added: Consider a function f that returns multiple values. Then to assign these values to, say var_1, and var_2, simply write: (var_1, var_2) = f (); This is an alternative to: f (); =var_2; =var_1; Changes since 0.96: It is now possible to use short circuit boolean evaluation of logical expressions is the `orelse' and `andelse' constructs. Previously, these constructs were only available at the infix level. The new syntax looks like (example taken from JED's rmail.sl): if (orelse {re_bsearch("^\\CFrom:.*<\\(.+\\)>");} {re_bsearch("^\\CReply-To: *\\([^ ]+\\) *");} {re_bsearch("^\\CFrom:.*<\\(.+\\)>");} {re_bsearch("^\\CFrom: *\\([^ ]+\\) *");} {re_bsearch("^\\cFrom +\\([^ ]+\\) *");} ) { from = rmail_complex_get_from(from); } Modified some of the array code to use handles to arrays instead of actual arrays. This adds alot more protection for the use of arrays. The downside is that there is a limit on the number of active arrays. This limit has been set to a default value ot 256. An ``active'' array is an array that has been created but not freed. Fixed a parse error that occurred when an `if' statement imediately follow the `:' in a switch statement. putenv intrinsic added. EXIT_BLOCK: if an exit block is declared, it is called just before the function returns to its caller. It is now possible to perform assignments in variable declaration statements, e.g., variable i = 0, imax = 10, n = strlen (name); Condition compilation of S-Lang source possible. See .sl files in the jed distribution. A bug which prevent assignment to a global C floating point variable was fixed. Changes to `calc': `apropos' function added to calc.sl. For example, `apropos("str")' creates a list of all intrinsic functions that contain the substring "str" (strcmp, strcat, etc...) Command line arguments are now loaded as S-Lang source files. This makes it possible to create a Unix executable such as: #! /usr/local/bin/calc define hello_world () { print ("hello world"); } loop (10) hello_world (); quit ();