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 . 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 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 ();