Menu

Seed7 / News: Recent posts

New Seed7 Release 2025-09-30

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.net

Changelog:

  • The LTO-related warnings during the build of Seed7 have been eliminated. Many thanks to "apocelipes" for changing the makefiles to use -flto=auto.
  • The program chkccomp.c has been improved to always define the macro DEFINE_INITIALIZER_MACRO. Many thanks to Bruce Axtens for pointing out that a build with mk_msvc.mak failed.
  • In the FAQ explanations of software maintainability and result variables have been added. The explanations of simple function profiling, readability and variable initialization have been improved. The types parseError, pollData and listener have been added to the explanation about syntax highlighting.
  • Chapters about the types parseError, pollData and listener have been added to the manual. The chapters about the graphics library, the foreign function interface and errors have been improved.
  • The example programs lst80bas.sd7, lst99bas.sd7 and lstgwbas.sd7 have been added. These programs decode and list tokenized BASIC programs.
  • The bas7.sd7 (basic interpreter) example program has been improved:
    • FOR-loops have been changed to match the behavior of other BASIC interpreters.
    • A warning, if a variable got its value from a for-loop, has been added.
    • Support for names with underline (_) has been added.
    • Support for double precision literals has been added.
    • Support for string literals has been improved to allow quotation marks in string literals.
    • Support for the OPEN statement has been improved. An additional variant of the OPEN statement is supported now.
    • The error handling in LET, GET, PUT, MID$, WHILE, WEND, LOAD, BLOAD, CHAIN and RUN statements has been improved.
    • The error handling in the functions ASC, LOG, SQR, CINT, CLNG, FIX, LEFT$, MID$, RIGHT$, TAB() and SPC() has been improved.
    • A recognition of OVERFLOW errors has been added for multiplication and division operations.
    • The ON ERROR handling is reset when a file is loaded.
    • Constants for error codes have been introduced.
    • Support for the statements OPTION BASE, REDIM, SUBEXIT, SUBEND and ACCEPT has been added.
    • Now TIMER and PCOPY statements are recognized.
    • The support for the statements DEFDBL, DEFINT, DEFLNG, DEFSNG, PRINT, LPRINT, DISPLAY, DEF SEG, BLOAD, BSAVE and OUT has been improved.
    • The support for the subroutines CHAR, CLEAR, KEY and SOUND has been improved.
    • Support for the function ENVIRON$ has been added.
    • The support for the function VARPTR$ has been improved.
    • Support for an alternate POS function, which searches in a string, has been added.
    • The support for LONG, INTEGER, FLOAT and DOUBLE variables has been improved in DIM and GET statements.
    • In CGA, EGA and VGA images checks for the width and height have been added. They are checked for their presence and that they are greater than 0.
    • The name INSTR is allowed as variable and function
    • The support for the RUN command in interactive mode has been improved.
    • If the keyword GOTO or GOSUB follows THEN or ELSE it is not considered to be a label.
    • The scrolling in graphics mode has been improved.
    • Support for image variables in SCREEN 9 mode has been added.
    • The check for the file name extension ".bas" has been fixed to work for short file names.
    • The logging of DO, LINE INPUT, LINPUT, KEY, LET, NEXT, GET, EXIT, MID$ and VAL has been improved.
  • The pv7.sd7 example program has been improved to display an image if the file extension does not fit but the image magic does fit.
  • The Seed7 compiler (s7c) has been improved:
    • The handling of dynamic types has been fixed to work correclty if a derived type does not use type_implements_interface().
    • The initialization of array and hash constants has been improved to avoid that a sanitizer complains about uninitialized data.
    • The compilation of a library has been improved to generate code for all objects.
    • The function write_file_head() has been improved to use multi-line string literals.
  • The program chkfil.sd7 has been improved:
    • A test case for a derived type which does not use type_implements_interface() has been added.
    • Now templates are used to declare raisesRangeError() and raisesFileError().
    • The checks for file operations with a closed file have been refactored to use raisesFileError().
    • The functions check_use_after_close1() and check_use_after_close2() have been added.
    • Checks have been added to verify that inputReady(), getTerminatedString() and setbuf() with a closed file raise FILE_ERROR.
  • In chkflt.sd7 tests of str() with negative float values have been added.
  • In chkdb.sd7 tests for simple, fraction, combined and advanced durations have been added. Checks for positive and negative durations are done in separate test functions.
  • In duration.s7i the function duration() has been improved to check for more invalid values.
  • The library db_prop.s7i has been improved to allow fractions of a second in MySQL durations. The duration type for MS SQL-Server has been changed as well.
  • In draw.s7i the function rectTo() has been improved to work with any diagonally opposite corners of the rectangle.
  • In draw.s7i the undocumented functions color(col) and color(col,col) are deprecated.
  • Unnecessary calls of color() have been removed from bas7.sd7, castle.sd7, dnafight.sd7, lander.sd7, percolation.sd7 and tetg.sd7.
  • In tls.s7i the ECDSA verification has been improved to use curve and key from the certificate.
  • In tls.s7i the function negotiateSecurityParameters has been improved to avoid writing to broken pipe.
  • The library gethttp.s7i has been improved:
    • The function getHttp() has been split into getHttpHeader() and getHttpBody().
    • The function getHttpHeader() has been refactored to use a case statement.
    • In getHttpHeader() the expression pos(line, ":") has been replaced with colonPos.
    • The function getHttpLocation() has been refactored to call getHttpHeader().
    • The functions sendGet() getHttpHeader() and getHttpLocation() have been improved to use cookies in URL redirections.
    • A function to show a httpLocation has been added.
    • The function getHttpBody() has been changed to return an empty string if the charset is not supported or the encoding is wrong.
  • In tga.s7i tgaHeader parameters have been changed to be in-parameters if the parameter is not changed.
  • In pixmap_file.s7i the function v_scroll() has been improved to erase an area with the background color.
  • Support for the actions DRW_COLOR, DRW_BACKGROUND, DRW_RECT, DRW_POINT, DRW_LINE, DRW_CIRCLE, DRW_ARC2, DRW_ARC, DRW_FARCPIESLICE, DRW_FARCCHORD, DRW_FCIRCLE and DRW_FELLIPSE has been removed from interpreter and compiler. These actions have not been used for years.
  • The unused source files con_con.c, con_cur.c, con_tcp.c, con_cap.c and con_x11.c have been removed.
  • In common.h macro definitions of integer decimal and hexadecimal sizes have been added (e.g. INT_DECIMAL_SIZE, UINT_DECIMAL_SIZE, INT_HEXADECIMAL_SIZE, LONG_DECIMAL_SIZE, ULONG_DECIMAL_SIZE, ...). These macros are used in various files for declarations of buffers used by integer to decimal or hexadecimal conversions.
  • Definitions of the log2Function() and log2Error() macros have been added to common.h. These macros log to stderr.
  • In drw_x11.c, drw_win.c and drw_emc.c the checks for RANGE_ERROR in the drawing functions for rectangles, points, lines, ellipses, circles, filled circles, arc pie slices, arc chords, arcs and arcs with width have been improved.
  • In drw_x11.c, drw_win.c and drw_emc.c checks have been added to verify that startAngle and sweepAngle are in the allowed range.
  • In drw_x11.c, drw_emc.c and drw_win.c the checks for RANGE_ERROR in the functions drwCopyArea(), drwCapture(), drwGetPixel(), drwGetPixmap(), drwImage(), drwNewPixmap(), drwPutScaled() and drwSetPos() have been improved.
  • The file drw_x11.c has been improved:
    • Now the static variables emptyCursor and mygc are initialized.
    • The function drawClose() has been improved to free emptyCursor.
    • In the function drawInit() an initialization of emptyCursorColor has been added. This avoids that XCreatePixmapCursor() uses undefined XColor data.
    • The element parentWindow has been added to x11_winRecord. Code to maintain the usage_count of parent windows has been added as well.
  • In drw_emc.c code to maintain the usage_count of the existing parentWindow element of emc_winRecord has been added.
  • In drw_drv.h, drw_dos.c, drw_emc.c, drw_win.c, drw_x11.c and drw_act.s7i the const_ has been removed from the type of the parent_window parameter in drwOpenSubWindow().
  • In drw_win.c the generation and usage of pointList values has been improved to avoid integer overflow. In drwGenPointList() signed 31-bit x and y coordinates are accepted and stored in a pointList. In drwPolyLine() and drwFPolyLine signed 31-bit x and y values are accepted. Adding two signed 31-bit integers results in a signed 32-bit integer which is allowd in GDI functions.
  • In tim_rtl.c the function assignIsoDuration() has been added. It is called from sqlColumnDuration() in sql_lite.c.
  • Support for the configuration values CONSTRUCTOR_ATTRIBUTE, DEFINE_INITIALIZER_MACRO, CC_OPT_POSITION_INDEPENDENT_CODE, CASTING_GETS_A_UNION_ELEMENT and UNIONS_CAN_CONVERT_TO_GENERIC has been added to cc_conf.s7i, confval.sd7, cmd_rtl.c and chkccomp.c.
  • In dcllib.c the function dcl_var() has been improved to consider parameters of BLOCKOBJECT in a var-declaration.
  • In match.c the function substitute_params() has been improved to assure that created_object is not undefined.
  • In cmd_unx.c the function unsetenv7() has been improved to avoid that 'found' becomes a dangling pointer.
  • In infile.c an include of sys/stat.h has been added if HAS_MMAP is not set.
  • In striutl.c the function cstriAsUnquotedCLiteral() has been added. This function is used for logging in fwd_term.c, trm_cap.c and trm_inf.c.
  • In error.c definitions of sprintfIntCharDescr(), sprintfLongCharDescr(), INT_CHAR_DESCR_BUFFER_SIZE and LONG_CHAR_DESCR_BUFFER_SIZE have been added.
  • In traceutl.c the functions prot_cstri(), prot_cstri8() and prot_string() have been improved to call conWrite() only if CONSOLE_WCHAR is defined.
  • In traceutl.c the function list_node_names() has been improved to avoid a buffer overflow.
  • In big_rtl.c and big_gmp.c a memory leak in bigHexCStri() has been closed. Logging functions have been refactored to call at most one bigHexCStri() in a printf().
  • In emc_utl.c the function doExit() has been improved to free all atExitDataType elements of the atExitLifoStack.
  • In soc_rtl.c the definition of MAX_SOCK_ADDRESS_LEN has been fixed. Declarations of serviceName buffers have been changed as well. Since ports are unsigned 16-bit integers the type uint16Type is used for them.
  • In str_rtl.c the function ustriCmpGeneric() has been improved to assure that the generic value is always initialized. Additionally a MEMORY_ERROR is raised if ALLOC_USTRI() fails.
  • In con_inf.c checks, if the console has been initialized, have been added.
  • In trm_cap.c the functions my_tgetent(), my_tgetnum(), my_tgetflag(), my_tgetstr() and getcaps() have been refactored. Several fixed size buffers have been removed and for the remaining ones buffer overflows are avoided.
  • In trm_cap.c the functions printCapEscapedStri(), printStriCap() and showCapabilities() have been added.
  • In trm_inf.c the functions read_cap_name(), read_int_cap(), read_stri_cap(), assign_cap(), fix_capability() and getcaps() have been refactored. Several fixed size buffers have been removed and for the remaining ones buffer overflows are avoided.
  • In trm_inf.c the function fix_capability() has been deactivated with #define USE_FIX_CAPABILITY 0.
  • The logging of database passwords has been removed in sql_db2.c, sql_fire.c, sql_ifx.c, sql_lite.c, sql_my.c, sql_oci.c, sql_odbc.c, sql_post.c, sql_srv.c and sql_tds.c.
  • In sql_post.c definitions of htons(), ntohs(), htonl() and ntohl() have been added if necessary.
  • In sql_lite.c, sql_my.c, sql_fire.c and sql_tds.c a link with usage_count from a prepared statement to the database has been added. Now all database drivers maintain the db link in prepared statements.
  • The db link to the database has been added to sqlStmtStruct (in common.h) and preparedStmtStruct (in sql_rtl.c).
  • In sql_cli.c, sql_fire.c, sql_lite.c, sql_my.c, sql_oci.c, sql_post.c and sql_tds.c the flag isOpen has been added to to the database struct. The flag isOpen is set when a database is opened and it is cleared when the database is closed with sqlClose().
  • The flag isOpen has been added to databaseStruct (in common.h) and dbStruct (in sql_rtl.c).
  • In sql_rtl.c the functions sqlBindBigInt(), sqlBindBigRat(), sqlBindBool(), sqlBindBStri(), sqlBindDuration(), sqlBindFloat(), sqlBindInt(), sqlBindNull(), sqlBindStri(), sqlBindTime(), sqlColumnBigInt(), sqlColumnBigRat(), sqlColumnBool(), sqlColumnBStri(), sqlColumnDuration(), sqlColumnFloat(), sqlColumnInt(), sqlColumnStri(), sqlColumnTime(), sqlIsNull(), sqlStmtColumnCount() and sqlStmtColumnName() have been changed to raise DATABASE_ERROR if the database of a prepared statement is not open. The usage of an empty prepared statement raises RANGE_ERROR.
  • In sql_rtl.c the functions sqlClose(), sqlCommit(), sqlGetAutoCommit(), sqlPrepare(), sqlRollback() and sqlSetAutoCommit() have been changed to raise DATABASE_ERROR if a closed database is used. The usage of an empty database raises RANGE_ERROR.
  • In sql_rtl.c the checks of function pointers have been refactored. Now a NULL function pointer raises DATABASE_ERROR.
  • In sql_cli.c, sql_fire.c, sql_lite.c, sql_my.c, sql_oci.c, sql_post.c and sql_tds.c the function freeDatabase() has been improved to call sqlClose() only if the database is still open.
  • In sql_my.c and sql_oci.c a check if the database is open has been added to sqlCommit(), sqlGetAutoCommit(), sqlPrepare(), sqlRollback() and sqlSetAutoCommit().
  • In sql_fire.c a check if the database is open has been added to sqlCommit() and sqlPrepare().
  • Functions in sql_cli.c, sql_fire.c, sql_lite.c, sql_my.c, sql_oci.c, sql_post.c and sql_tds.c have been changed to raise DATABASE_ERROR if a closed database is used.
  • A definition of INTERVAL_FRACTION_PRECISION has been added to sql_db2.c, sql_ifx.c, sql_odbc.c and sql_srv.c. This constant is used in sql_cli.c to determine the precision of interval fractions in SQL_INTERVAL_STRUCT.
  • In sql_cli.c the binding of time/date values has been fixed (this avoids a heap corruption).
  • In sql_cli.c the binding and reading of intervals (durations) has been improved. The function assignInterval() has been added.
  • In sql_cli.c the function assignToIntervalStruct() has been improved to normalize a duration before converting it to a SQL_INTERVAL_STRUCT. The conversion to SQL_INTERVAL_STRUCT has been improved as well.
  • In sql_lite.c the value MAX_SIZE_ISO_DURATION is computed now.
  • In sql_my.c the function sqlBindDuration() has been improved to avoid unsigned long overflow.
  • The function dbNotOpen() has been added to sql_base.c.
  • In exec.c in the function par_init() the debug prints have been improved.
  • In fil_rtl.c the function filSetbuf() has been improved to raise FILE_ERROR if it is called with a closed file.
  • In fil_dos.c, fil_emc.c, fil_unx.c and fil_win.c the function filInputReady() has been improved to raise FILE_ERROR if it is called with a closed file.
  • In fwd_term.c forwarding of termcap functions has been added.
  • The functions XFreeCursor() and XSetErrorHandler() have been added to fwd_x11.c and x11_x.h.
  • In flt_rtl.h the buffer size for buffers used by doubleToFormatE() has been fixed to consider that negative numbers have the maximum length.
  • The functions continue_question() (in runerr.c) and continue_question() (in sigutl.c) have been refactored.
  • In kbd_inf.c, kbd_poll.c, msg_stri.c, runerr.c, sigutl.c, soc_rtl.c, sql_post.c, gkb_x11.c, sql_lite.c and traceutl.c literals in the code have been replaced by #define constants.
  • The program chkccomp.c has been improved:
    • Now it determines CONSTRUCTOR_ATTRIBUTE, DEFINE_INITIALIZER_MACRO, CC_OPT_POSITION_INDEPENDENT_CODE, FLOAT_MIN_EXP10, FLOAT_MAX_EXP10, MEMCMP_WITH_SIZE_0_RETURNS_0 and UNIONS_CAN_CONVERT_TO_GENERIC.
    • The functions getConstructorAttribute(), getInitializerMacro64(), getInitializerMacro32() and determineLibraryProperties() have been added.
    • In extractPostgresOid() a check, if essential OIDs are missing in the generated pg_type.h, has been added.
    • A test has been added if memcmp() with a size of 0 returns 0 even with NULL parameters (MEMCMP_WITH_SIZE_0_RETURNS_0).
    • An include of stdlib.h has been added to a test program which uses malloc().
    • Test programs have been improved to free allocated memory.
    • A buffer overflow is avoided in a test program for array literals.
    • A superfluous parameter of strcmp() has been removed from a test program.
    • Test programs have been changed to include stdio.h, if the test uses printf().
    • Test programs for X11 have been improved to close the display.
    • Parentheses have been put around -1.
    • A definition of EAI_NODATA is written to version.h, if it is missing and getaddrinfo() is present.
    • A return statement has been added to the function getCodePage().
  • In wrdepend.c it is assured that the variable level is not undefined when it is written.
  • The makefile mk_tcc_l.mak has been improved to allow a compilation with tcc if 'X11/extensions/Xrender.h' is missing.
  • A definition of CC_OPT_POSITION_INDEPENDENT_CODE has been added to makefile, mk_clang.mak, mk_cygw.mak, mk_freebsd.mk, mk_linux.mak, mk_mingc.mak, mk_mingw.mak, mk_msys.mak, mk_nmake.mak, mk_osx.mak and mk_osxcl.mak.
  • Logging functions have been added or improved in big_gmp.c, big_rtl.c, cmd_rtl.c, con_inf.c, con_rtl.c, drw_emc.c, drw_win.c, drw_x11.c, fillib.c, fil_rtl.c, flt_rtl.c, fwd_term.c, fwd_x11.c, hshlib.c, kbd_poll.c, pol_unx.c, soc_rtl.c, sql_base.c, sql_cli.c, sql_fire.c, sql_lite.c, sql_my.c, sql_oci.c, sql_post.c, sql_rtl.c, sql_tds.c, strlib.c, s7.c, trm_cap.c, trm_inf.c and traceutl.c.
  • Documentation comments have been added or improved in bas7.sd7, complex.s7i, draw.s7i, flt_rtl.c, listener.s7i, poll.s7i, progs.s7i, string.s7i, drw_emc.c, drw_win.c and drw_x11.c.... read more
Posted by Thomas Mertes 2025-09-30

New Seed7 Release 2025-07-29

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.net

Changelog:

  • The program chkerr.sd7 has been changed to search include libraries in the directory "../lib" as well. This is needed for the FreeBSD build. Many thanks to Pietro Cerutti for the bug report.
  • The files chkerr.sd7, err.sd7, reference.s7i, seed7_05.s7i and struct.s7i have been refactored to use named parameters instead of 'param' parameters. Many thanks to Pierre Rouleau for pointing out parameter declarations with the keyword 'param'.
  • In name.c the function globalObjects() has been improved to return file and line of enum literals. Many thanks to Pierre Rouleau for reporting that for enum values the function globalObjects() returns objects with "?" for filename and 0 for line.
  • In executl.c the function old_do_create() has been improved to trigger an error if a function is created with a non-function value (e.g. a literal). Many thanks to Pierre Rouleau for pointing out function declarations with a literal as value instead of a function body.
  • Explanations about case sensitivity, function declarations, object initialization, documentation comments and the seed7-mode of Emacs (thanks to Pierre Rouleau) have been added to the FAQ.
  • Links in the FAQ have been improved.
  • Several FAQ answers have been improved:
    • The keywords used for syntax highlighting.
    • The reason why Seed7 does not use type inference.
    • Why forward declarations are necessary.
    • What an abstract data type is.
    • The lifetime of an object.
  • Chapters about forward declarations, interface declarations, creator, destroyer, pointList actions, structElement actions and system variables have been added to the manual.
  • The new library tga.s7i has been added. This library supports the TGA image file format.
  • The library imagefile.s7i has been improved to support TGA image files.
  • The Seed7 compiler (s7c) has been improved:
    • The recursive inlining of a function is limited to a maximum depth.
    • The recursion of getIntRange() is stopped if it is called with the same parameter again.
    • The recursion of isPureBlockFunction() is stopped if it is called with the same parameter again.
    • The code generation for local functions has been improved to work for deeply nested functions.
    • A compiler warning for endless recursion in interface functions has been added.
    • The function process_type_declaration() has been improved to use interfaces(aType) to call addImplementationToInterface(). The function process_itf_cpy2_declaration(), which called addImplementationToInterface() before, has been removed.
    • Support for local variables of type void has been added.
    • Optimizations for the array functions length(), minIdx() and maxIdx() have been added.
    • The generation of prototype declarations has been changed: If a function calls itself recursively no additional prototype declaration of the function is needed.
    • The function evaluate() has been removed from comp/const.s7i. The evaluate() function with argument list from progs.s7i is called by canEvaluateSpecialAction() instead.
    • The optimization of for-each-loops has been improved to remove some index checks. The estimation of an integer variable range in process_prc_for() has been improved to consider for-loops used in inlined code.
    • In prc_act.s7i the processing of the else-part in the functions process_else() and process_const_prc_if_noop() has been improved. CONSTENUMOBJECT (corresponding to the non-function literal 'ELSIF_EMPTY' has been replaced with BLOCKOBJECT (corresponding 'return ELSIF_EMPTY').
    • The function process_dynamic_call() has been improved to process constant values of any type. For constants which are wrongly defined as function the create() function of the function result type is used.
    • The function process_dynamic_param_struct_elem() has been improved to use ustriCmpGeneric(), which works with 32-bit pointers, instead of strcmp().
    • The function enter_ref_constant_types() has been added. The function adds the types of referred objects to constTable.type_const.
    • The macro NORETURN has been moved from the end of the prototype to the beginning.
    • The function getAnyParamToTempAssigns() has been improved to use a 'const_*' type if necessary. This fixes the compilation of chkdb.sd7.
    • The compilation of the function setSearchPath() has been fixed. A prototype of cmdSetSearchPath() has been added to the generated C program.
    • The compilation of the function hashCode() for process arguments has been fixed. The generated prototype of pcsHashCode() has been changed to use a processType argument.
    • The function process_expr() has been improved to avoid casting a SETOBJECT to a function type.
    • The compiler version number has been raised to 3.5.
  • The interpreter version number has been raised to 5.4.
  • The program dnafight.sd7 has been improved:
    • Now the type 'microbe' is defined as interface instead of varptr.
    • The headline of the statistics has been improved and the text '(Winner)' has been added to the winner.
    • Now a warning is written if the conversion to integer failed.
    • The comments at the beginning and end of functions have been changed.
  • The program sydir7.sd7 has been improved to support the options -e and -o.
  • The program s7check.sd7 has been improved to work for include libraries. To check *.s7i files an include of "seed7_05.s7i" and an empty main program is used.
  • Tests for based integer literals with lower case letters have been added to chkint.sd7.
  • Tests for multiplications with integer.first, integer.last and
    -integer.last product have been added to chkint.sd7.
  • Tests for mutually recursive functions with the ternary operator have been added to chkbool.sd7.
  • Tests for set comparisons from documentation comments have been added to chkset.sd7.
  • In seed7_05.s7i an assignment for the type void has been added.
  • In progs.s7i the functions compare() and hashCode() have been added. This allows hash tables with programs as key or value.
  • In progs.s7i the functions evaluate(), appendFormalParams() and interfaces() have been added.
  • In the library forloop.s7i support the for-loop 'for aBoolean range boolean do' has been added.
  • In the library category.s7i the functions compare() and hashCode() have been added for category values.
  • In bitdata.s7i parameters of the functions openLsbInBitStream() and openMsbInBitStream() have been changed to use an inout file parameter, because the files in LSB- and MSB-bit-streams are changed.
  • In osfiles.s7i the new function getFileName() has been introduced.
  • In osfiles.s7i the undocumented function parentDir() has been renamed to getParentDir() and a documentation of it has been added.
  • In field.s7i the type field_file has been renamed to fieldFile.
  • In field.s7i the functions getwd() and getln() have been improved to show the cursor. The function write() has been added.
  • In msgdigest.s7i the definitions of blockSize and digestSize have been changed. Now they are defined as integer constants.
  • In seed7_05.s7i the definition of the else-part has been changed to use 'return ELSIF_EMPTY'. Before a function definition with a non-function value (the literal 'ELSIF_EMPTY') was used.
  • In seed7_05.s7i the types creator and destroyer have been introduced. All libraries with create and destroy declarations have been changed to use the types creator and destroyer.
  • The program chkerr.sd7 has been changed to declare create operators with the type creator.
  • In chkerr.sd7 tests for errors have been added:
    • If a creator or destroyer is used as statement.
    • If a function is created with a non-function value.
    • If a comma expression is used as name of a struct element.
    • If f_param_type is NULL.
    • For REDECLARATION, PREVIOUS_DECLARATION, EXCEPTION_RAISED, IDENT_EXPECTED, PARAM_DECL_OR_SYMBOL_EXPECTED, PROC_EXPECTED and EXPECTED_SYMBOL errors.
  • In aes.s7i, aes_gcm.s7i, arc4.s7i, blowfish.s7i, cipher.s7i, des.s7i and tdes.s7i the definitions of blockSize have been changed. Now they are defined as integer constants.
  • Includes have been added to bitmapfont.s7i, browser.s7i, db_prop.s7i, elf.s7i, field.s7i, gtkserver.s7i, image.s7i, math.s7i, pixmapfont.s7i, stars.s7i, vector3d.s7i, vectorfont.s7i and wildcard.s7i such that s7check passes.
  • Occurrences of the functions chr() and flt() have been replaced by char() respectively float().
  • The file name.c has been improved:
    • The function close_current_stack() has been changed to use reverse_list().
    • The function free_name_list() has been changed to free parameters if a function has been redeclared.
    • The function in eval_name_list() has been changed to stop evaluating parameters after an error.
  • The function free_params() has been moved from name.c to entutl.c. It is called from close_current_stack() and free_local_consts() to free properties and params. The call from free_local_consts() has been added.
  • In dcllib.c in the function dcl_elements() the declaration of struct types has been improved:
    • Now the stack is always grown and pushed before evaluating local_decls (which contains the struct element declarations).
    • Now an EXCEPTION_RAISED error is triggered if the evaluation of local_decls raises an exception.
    • Now an DECL_FAILED error is triggered if a struct element has no syobject.
  • The file prclib.c has been improved:
    • The functions prc_cpy() and prc_create() have been improved to use the usage_count of block elements.
    • The function prc_destr() has been added.
    • The function evaluate_local_decls() has been changed to use prc_semicolon instead of prc_noop.
    • The functions prc_res_begin() and prc_res_local() have been changed to completely free result_var in case of an error.
    • A test, if the argument vector is NULL, has been added to prc_args().
    • In prc_local(), prc_res_begin(), prc_res_local(), the order of free calls for block components has been changed.
  • The file blockutl.c has been improved:
    • In free_block() the order of free calls for block components has been changed.
    • The function reverse_loclist() has been added. The function reverse_loclist() is used in free_loclist() to reverse the local list before removing list elements.
    • The function free_local_consts() has been improved to use reverse_list().
    • The function free_locobj() has been changed to non-static. In prclib.c calls of free_name() have been replaced with calls of free_locobj().
  • In objutl.c the function dump_temp_value() has been improved to free FORMPARAMOBJECT objects. The usage_count of a BLOCKOBJECT is now considered as well.
  • In findid.c the function check_list_of_syntax_elements() has been renamed to list_of_syntax_elements_okay(). This function is used by def_statement_syntax().
  • In listutl.c the function reverse_list() has been added.
  • The file data.h has been improved:
    • The macros GET_FILE_NUM() and GET_LINE_NUM() have been renamed to POSINFO_FILE_NUM() and POSINFO_LINE_NUM() respectively.
    • The new macros PROPERTY_FILE_NUM() and PROPERTY_LINE_NUM() have been introduced.
    • The STRUCT_OWNER flag has been added. The STRUCT_OWNER flag is set for the object which owns a certain structValue. Other objects do not own the structValue.
    • The EMBEDDED flags has been added. The EMBEDDED flag is set for all objects inside arrays and structs.
    • The new category ILLEGALOBJECT has been introduced. The system variables are initialized with dummy ILLEGALOBJECT values in syvarutl.c. The usage of a system variable with a dummy ILLEGALOBJECT triggers an error.
    • A usage_count has been added to blockStruct.
    • The typeStruct element 'interfaces' has been changed from typeListType to listType.
    • The type typeListType has been removed. The corresponding heap statistic has been removed from heaputl.h and flistutl.c.
  • The files infile.c, sctlib.c and itflib.c have been refactored to use unlikely() for exception conditions.
  • In itflib.c the functions itf_cpy(), itf_cpy2(), itf_create(), itf_create2() and itf_to_interface() have been changed to transfer the ownership of a structValue to a new object.
  • In itflib.c in functions raising an exception the variable interface_exec_object has been added and used in calls of raise_with_obj_and_args().
  • In sctlib.c in functions raising an exception the variable struct_exec_object has been added and used in calls of raise_with_obj_and_args().
  • In sctlib.c the function sct_destr() has been refactored to use old_value instead of arg_1(arguments).
  • In arrlib.c in functions raising an exception the variable array_exec_object has been added and used in calls of raise_with_obj_and_args().
  • The file arrlib.c has been refactored to use else parts after if-statements are checking for an error.
  • In arrlib.c the functions arr_baselit(), arr_baselit2(), arr_extend(), arr_gen(), arr_idx(), arr_insert(), arr_push(), arr_remove() and arr_times() have been changed to set and clear the EMBEDDED flag for array elements.
  • In str_rtl.c the function ustriCmpGeneric() has been introduced and the function ustrCreateGeneric() has been renamed to ustriCreateGeneric().
  • In rfllib.c the function rfl_expr() has been improved to set file and line of enumeration literals.
  • In reflib.c a NULL check has been added to ref_issymb().
  • In reflib.c the function ref_append_params() has been added.
  • In typlib.c the function typ_interfaces() has been added.
  • In prglib.c the functions prg_cmp(), prg_eval_with_args() and prg_hashcode() have been added.
  • In infile.c the function speedup() has been improved to only call mmap() if the file size is not 0. The function mmap() would fail for a size of 0.
  • In scanner.c the function scan_eof() has been improved to leave in_file.line unchanged in case of an EOF_ENCOUNTERED error. This way an EOF_ENCOUNTERED error writes the last line of a file.
  • In analyze.c the function declAny() has been changed to trigger an EXCEPTION_RAISED arror instead of a fatal memory error.
  • In analyze.c in the function analyzeFile() the length of sourceFilePath is now reduced with strHeadAssign(). This avoids a problem if followLink() changes sourceFilePath before it is freed.
  • In parser.c the function decl_const() has been improved to set file_number and line from in_file if they are 0 in the object.
  • In parser.c commented out code has been removed.
  • The file error.c has been improved:
    • The function storeLineOfCurrentFile() has been improved to support writing an error line below.
    • The function storePositionedErrorLine() has been improved to set errorLine to "" in case of an unknown file.
    • The function setPlaceForObject() has been removed.
    • The function setPlaceAndLine() has been introduced. Several calls of setPlaceAndLine() have been added.
    • The function err_type() has been changed to use an objectType parameter. This improves the place of the PROC_EXPECTED error messages.
    • The function err_existing_obj() has been improved to assure that 'descriptor.property' is present before accessing it.
  • In msg_stri.c the function appendType() has been improved to use a recursive call for function types.
  • In match.c the functions match_subexpr_var() and match_subexpr_const() have been changed to use the objectType parameter 'type_match_obj' instead of typeType parameter 'object_type'.
  • In match.c the function match_subexpr_param_attr() considers now that the parameter f_param_type might be NULL.
  • The file executl.c has been improved:
    • The function destr_interface() has been introduced. This function is used by itf_destr() and sct_destr(). It is called to free the struct object value of an INTERFACEOBJECT. It frees the structValue if the usage_count is 0. Non-embedded struct objects without property are removed as well.
    • The functions get_create_call_obj(), get_destroy_call_obj(), type_create_call_obj(), type_copy_call_obj(), type_ord_call_obj(), type_in_call_obj() and type_value_call_obj() have been improved to work if err_info is not OKAY_NO_ERROR. The variable copy_err_info is used for calls of copy_expression().
    • The function free_array() has been introduced. It frees an array only if all elements are unused.
    • In executl.c the functions sct_elem_initialisation() and arr_elem_initialisation() have been changed to set the EMBEDDED flag for all elements.
  • In exec.c the function exec_dynamic() has been improved to check if element_value == NULL.
  • In exec.c in the function exec_action() a check for ACT_ILLEGAL has been added. This code is conditionally compiled if the macro WITH_ACTION_CHECK is TRUE.
  • In runerr.c the function raise_with_obj_and_args() has been improved free the previous fail_expression.
  • The checks for category have been refactored:
    • In runerr.c the functions run_error(), empty_value() and var_required() have been renamed to categoryRequired(), emptyValue() and varRequired() respectively.
    • In runerr.h the macros category_required(), empty_value() and var_required() have been introduced.
    • In objutl.h the macro run_exception() has been renamed to expected_category().
    • In the files itflib.c, objutl.c, objutl.h, pollib.c, prog_comp.c and reflib.c all calls of run_error() and run_exception() have been replaced with calls of category_required() and expected_category() respectively.
  • In gkb_emc.c, gkb_win.c and gkb_x11.c the function gkbCloseKeyboard() has been introduced. This function frees resources associated with a graphic keyboard.
  • Functions in prg_comp.c have been improved such that prgDestr() frees objects and lists created by prgMatchExpr().
  • The file prg_comp.c has been improved:
    • The functions free_list_objects(), prgCpyGeneric(), prgCreateGeneric(), prgDestrGeneric() and prgEvalWithArgs() have been added.
    • The function prgSysvar has been changed to assure that a system variable is not an ILLEGALOBJECT.
    • The function prgDestr() has been improved to set interpreter_exception to TRUE while data is freed.
  • In typ_data.c the function typInterfaces() has been added. This function returns an array of interface types which implement a given type.
  • In ref_data.c the function refAppendParams() has been added.
  • In ref_data.c the function refAlloc (called for the action REF_ALLOC) has been improved to allocate a copy of the property.
  • Now objects created by refAllocVar() are freed by prgDestr().
  • In chkccomp.c the detection of the NORETURN macro has been improved and the determination of STRCMP_RETURNS_SIGNUM has been added.
  • In traceutl.c the functions printObjectName and printLocList() have been added.
  • In traceutl.c the function printformparam() has been improved to print symbol parameters.
  • The files read_me.txt and read_me.htm have been updated.
  • Support for the actions PRG_CMP, PRG_EVAL_WITH_ARGS, PRG_HASHCODE, PRC_SEMICOLON, REF_APPEND_PARAMS and TYP_INTERFACES has been added to interpreter and compiler.
  • Support for the action PRC_DESTR has been added to the interpreter.
  • The actions PRC_VARFUNC and PRC_VARFUNC2 have been renamed to PRC_RETURN_VAR and PRC_RETURN_VAR2 respectively.
  • The makefiles have been improved to create the s7check executable with 'make utils'.
  • In bas7.sd7, bigfiles.sd7, calc7.sd7, castle.sd7, comanche.sd7, diff7.sd7, dnafight.sd7, find7.sd7, findchar.sd7, ftp7.sd7, ftpserv.sd7, hd.sd7, lander.sd7, mahjong.sd7, make7.sd7, mandelbr.sd7, pairs.sd7, panic.sd7, planets.sd7, portfwd7.sd7, s7c.sd7, savehd7.sd7, shisen.sd7, sokoban.sd7, sql7.sd7, sudoku7.sd7, sydir7.sd7, tar7.sd7, tet.sd7, tetg.sd7, toutf8.sd7, wator.sd7 and which which.sd7 the address of the Seed7 homepage has been changed to https://seed7.net .
  • Logging functions have been added or improved in actlib.c, arrlib.c, blockutl.c, big_rtl.c, dcllib.c, enulib.c, error.c, exec.c, executl.c, hshlib.c, infile.c, itflib.c, match.c, name.c, prclib.c, prg_comp.c, runerr.c and sctlib.c.
  • Documentation comments have been added or improved in aes.s7i, aes_gcm.s7i, arc4.s7i, bitset.s7i, blowfish.s7i, des.s7i, field.s7i, float.s7i, ftpserv.s7i, integer.s7i, struct.s7i, tdes.s7i blockutl.c, executl.c and name.c.... read more
Posted by Thomas Mertes 2025-07-29

New Seed7 Release 2025-05-16

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • Pierre Rouleau created a seed7-mode for Emacs (see: https://github.com/pierre-rouleau/seed7-mode/tree/main).
  • The build of Seed7 with graphics on MacOS, the keyboard drivers, chk_all.sd7, lander.sd7 and eliza.sd7 have been fixed. Many thanks to Pierre Rouleau for pointing out errors in these components.
  • The example program s7check.sd7 has been added. This program is used by the seed7-mode of Emacs.
  • In s7.c the main() function has been changed to assure that the program exit code is 1, when the program terminates due to an exception. Many thanks to Pierre Rouleau for pointing out that the exit code was 0.
  • Pierre Rouleau added a .gitignore file.
  • Support for JSON serialization / deserialization has been added with the new library json_serde.s7i.
  • An explanation, how Seed7 syntax highlighting can be introduced to editors, has been added to the FAQ.
  • The new library struct_elem.s7i with structElement functions has been added. The type structElement describes an element of a struct. The function elements(aStructType) returns an array structElement.
  • In the library struct.s7i the flag isStructType() and the function elements() have been added for all struct types.
  • In the library enumeration.s7i the flag isEnumType() has been added for all enumeration types.
  • A chapter about structElement has been added to the manual.
  • The chapter about symbol parameters in the manual has been improved.
  • The french characters Œ, œ and Ÿ have been added to bitmap- and vector-fonts.
  • The Seed7 compiler (s7c.sd7) has been improved:
    • The option -h has been added (it has the same meaning as -?). Pierre Rouleau pointed out that under zsh, the -? option of s7 and s7c is intercepted by the zsh shell and not passed to the Seed7 commands.
    • Support for the compilation of DYNAMIC functions with STRUCTELEMOBJECT has been added (this is used by the serialization / deserialization library).
    • Unnecessary switch statements and unnecessary switch case parts have been removed from dynamic decisions.
    • Support for reference and structElement constants has been added.
    • Support for str(aType) in compiled programs has been added.
    • In case of an exception nothing is appended to c_expr.expr. Some callers use c_expr.result_expr instead of c_expr.expr and appending to c_expr.expr can confuse them.
    • In lib/comp/int_act.s7i the condition for the inlining of random functions has been corrected.
    • The boolean flag calls_dcl_actions and the hash maps function_with_dcl_actions and function_not_declared have been added. The two new hash maps replace the hash map function_not_declared, which has been removed.
    • The compiler version number has been raised to 3.4.
  • The Seed7 compiler (s7c.sd7) has been refactored:
    • Tables of constants have been moved into the programConstants struct.
    • Flags for used libraries have been moved into then programUsesLibrary struct.
    • Statistical counters have been moved into the compilerStatistic struct.
    • Configuration data has been moved into the compilerConfig struct.
    • Type related hash tables have been moved into typeDataStruct.
    • The hash tables interfaceOfType, literal_function_of_enum_used, times_prototype_declared and times_prototype_declared have been moved into typeDataStruct.
    • Hash tables related to the copy, destr and create operations have been moved into typeDataStruct.
  • The program lander.sd7 has been improved to avoid an exception if 's' is typed during a landing operation.
  • The program eliza.sd7 has been improved to avoid an infinite loop after ctrl-D has been pressed.
  • In calc7.sd7 the error position for Unicode and double width characters has been improved. An unnecessary line continuation at the end of a string literal has been removed as well.
  • The function startPipe() has been added to the process.s7i library.
  • In chkerr.sd7 tests for APOSTROPHE_EXPECTED and WRONG_NUMERICAL_ESCAPE have been added.
  • In chkjson.sd7 tests for getJsonString(), structElement functions and for JSON serialization / deserialization have been added. The program chk_all.sd7 has has been adjusted to consider the changes in chkjson.sd7.
  • The function path(), which returns the absolute file path of a referenced object, has been added to the progs.s7i library.
  • The function structSymbols() has been added to the progs.s7i library.
  • The library editline.s7i has been improved to avoid calls of write() and moveLeft() with an empty string.
  • In pixmap_file.s7i the management of fontFile.column has been improved.
  • In window.s7i the function moveLeft() has been changed to call moveLeft() for the underlying out_file.
  • In category.s7i the new object category STRUCTELEMOBJECT has been introduced.
  • In seed7_05.s7i support for ignore() with an f_param parameter has been added.
  • In stdfont8.s7i, stdfont9.s7i, stdfont20.s7i and cronos16.s7i character images have been improved.
  • Interpreter and compiler have been improved to support the actions PCS_START_PIPE, PRG_STRUCT_SYMBOLS, REF_PATH, SEL_CMP, SEL_CONV1, SEL_CPY, SEL_CREATE, SEL_EQ, SEL_HASHCODE, SEL_NAME, SEL_NE, SEL_SYMB and SEL_TYPE.
  • The program chk_all.sd7 has been improved to use startPipe() instead of pipe2().
  • In analyze.c the function analyzeProg() has been improved to assure that errorFile is not a closed file.
  • In analyze.c the function analyzeFile() has been improved to determine the absolute path and to avoid that 'isOpen' is used uninitialized.
  • Support for absolute paths in inFileStruct has been added:
    • In infile.c the parameter absolutePath has been added to the function openInfile(). Calls of openInfile() in analyze.c and libpath.c have been adjusted.
    • In infile.c the functions get_file_path() and objectFilePath() have been added.
    • In infile.c the function openBString() has been improved to initialize in_file.path.
  • In literal.c a parameter has been removed from skip_lines().
  • In name.c the function close_current_stack() has been improved to change a freed BLOCKOBJECT to ACTOBJECT with ACT_ILLEGAL.
  • In dcllib.c the function dcl_global() has been improved to move the currently declared object to the end of the local_object_list. This assures that the function close_current_stack() can use destructor functions from types introduced in a local variable declaration.
  • In match.c the function substitute_params() has been improved:
    • A substitution for STRUCTELEMOBJECT objects has been added.
    • For EXPROBJECT, VALUEPARAMOBJECT and REFPARAMOBJECT objects the substitution with the data.owner object has been removed.
  • In error.c several function declarations have been changed to define parameters with 'const const_striType' instead of 'striType'.
  • In msg_stri.c the error handling in appendChar() has been fixed.
  • In heaputl.h and other files the heap statistic has been improved:
    • The macro FREE_STRI() has been renamed to FREE_STRI2() and a new FREE_STRI() macro with one parameter has been introduced.
    • The macro HEAP_FREE_STRI has been changed such that it works if WITH_STRI_CAPACITY is 0.
    • The heap statistic of the string reallocation has been refactored. The macros REALLOC_STRI_SIZE_SMALLER, REALLOC_STRI_CHECK_SIZE and REALLOC_STRI_SIZE_OK have been renamed to REALLOC_STRI_SIZE_SMALLER2, REALLOC_STRI_CHECK_SIZE2 and REALLOC_STRI_SIZE_OK2 respectively. The new macros REALLOC_STRI_SIZE_SMALLER, REALLOC_STRI_CHECK_SIZE and REALLOC_STRI_SIZE_OK without l1 parameter have been introduced.
    • Except for heaputl.h all calls of the macro COUNT3_STRI have been removed.
    • In some heaputl.h macros 'len' parameters have been renamed to 'unused'.
    • In some heaputl.h and big_rtl.c macro definitions the actual macro parameters have been changed to 'not-used'.
  • In flistutl.c the function compute_hs() has been refactored.
  • Changes have been done in cmd_rtl.c and str_rtl.c to allow that WITH_STRI_CAPACITY is 0.
  • In exec.c the interpreter has been improved to raise ACTION_ERROR if an endless recursion in a DYNAMIC function occurs.
  • In ref_data.c the functions refPath() and refSymb() have been added.
  • In ref_data.c the function refValue() has been improved to work for STRUCTELEMOBJECT.
  • In reflib.c the function ref_path() has been added.
  • The files sellib.c and sellib.h have been added.
  • In flt_rtl.c, fil_rtl.c and numutl.c the number of C compiler warnings has been reduced.
  • In prclib.c a condition in the function prc_while_noop() has been changed to avoid a possible use of the uninitialized variable cond.
  • In sctlib.c the function sct_incl() has been changed to set elem->value to zero after it has been moved to the struct.
  • In prglib.c the function prg_struct_symbols() has been added.
  • In prg_comp.c the functions addStructElement() and prgStructSymbols() have been added. The function addStructElement() is called from dcl_elements() in dcllib.c.
  • In striutl.c the function copy_stri() has been added. This function is used in analyze.c and infile.c.
  • In con_emc.c, emc_utl.c, emc_utl.h and gkb_emc.c the browser keyboard support has been refactored:
    • KEY_ID_... macros have been introduced.
    • Support for the keys f13 to f24 has been added.
    • If a non-control key is pressed a possible set altKey flag is ignored.
  • In big_rtl.c redundant prototype declarations have been removed.
  • In kbd_inf.c and kbd_poll.c the function kbd_init() has been improved:
    • The IXON flag is cleared (the XON/XOFF flow control is disabled).
    • The ISIG flag is cleared (no signal is sent on INTR, QUIT, SUSP, or DSUSP).
    • The IEXTEN flag is cleared (no implementation-defined input processing takes place).
    • The VDISCARD character is set to -1.
  • In kbd_inf.c in the function read_utf8_key() the comparisons have been simplified.
  • The program chkccomp.c has been improved:
    • Now it searches in /opt/homebrew/include for X11/X.h.
    • The search for the Xrender library has been improved.
    • The test program for Xrender has been changed to unconditionally return 1.
    • If X11_LIBRARY_PATH is defined absolute library paths are now added to the X11_DLL and X11_XRENDER_DLL macros.
    • The function describeLibrary() has been added to describe statically linked dynamic libraries.
    • Local variables and parameters have been renamed to avoid warnings about shadowing of global variables.
  • The makefiles mk_osx.mak and mk_osxcl.mak have been changed to allow the replacement of system headers (e.g. the include file for Xrender).
  • In all makefiles the target 'check' has been added. The targets 'check' and 'test' both run the test suite.
  • In str_rtl.c the functions ustrCreateGeneric() and ustriHash() have been added. These functions are used in the compiler (s7c.sd7) to handle DYNAMIC function decisions by structElement.
  • In tim_unx.c and tim_win.c a check that micro_sec is in the allowed range has been added.
  • In pcs_unx.c and pcs_win.c checks for process == NULL have been added to pcsExitValue(), pcsIsAlive() and pcsWaitFor().
  • In pcs_unx.c and pcs_win.c code to close and free process pipline files (stdin, stdout and stderr) has been added to pcsFree(). The corresponding code in pcsDestr() (in pcs_rtl.c) has been removed.
  • The function drawClose() has been added to drw_dos.c, drw_emc.c, drw_win.c and drw_x11.c.
  • In common.h the macro unsignedFitsInIntType() has been introduced. The macro is used in prg_comp.c and sql_lite.c to silence a warning.
  • The files read_me.txt and read_me.htm have been updated.
  • Parameter names in the header files arr_rtl.h, bst_rtl.h, cmd_rtl.h, common.h, con_rtl.h, datautl.h, db_fire.h, db_oci.h, db_tds.h, error.h, fil_rtl.h, hsh_rtl.h, infile.h, int_rtl.h, itf_rtl.h, msg_stri.h, objutl.h, rfl_data.h, set_rtl.h, soc_rtl.h, sql_rtl.h, str_rtl.h, symbol.h and typ_data.h have been changed to fit to the prototypes in the corresponding C source files.
  • Logging functions have been improved in blockutl.c, drw_x11.c, exec.c, fil_rtl.c, flt_rtl.c, fwd_term.c, fwd_x11.c, infile.c, name.c, pcslib.c, pcs_rtl.c, pcs_unx.c, pcs_win.c, prg_comp.c, reflib.c, soc_rtl.c, tim_rtl.c and ut8_rtl.c.
  • In hsh_rtl.c, infile.c, prclib.c and prg_comp.c commented out printf() calls have been removed.
  • In con_inf.c the functions inf_beep(), inf_standardcolour() and inf_setfont() are deactivated as OUT_OF_ORDER.
  • The unused functions textcolumns(), textheight() and textwidth() have been removed from con_cap.c, con_con.c, con_cur.c, con_dos.c, con_inf.c, con_tcp.c, con_wat.c, con_win.c and con_x11.c.
  • In error.h and and progs.s7i the parsing errors COMMENTOPEN, FILENOTFOUND, WRONGACTION, CARD_DECIMAL_TOO_BIG, NEGATIVEEXPONENT, DIGITEXPECTED, CARD_WITH_EXPONENT_TOO_BIG, EXTDIGITEXPECTED, ILLEGALBASEDDIGIT, CARD_BASED_TOO_BIG, APOSTROPHEXPECTED, CHAREXCEEDS, STRINGESCAPE, WRONGNUMERICALESCAPE, BACKSLASHEXPECTED, STRINGEXCEEDS, NAMEEXPECTED, CARD_EXPECTED, STRI_EXPECTED and OBJTWICEDECLARED have been renamed to UNCLOSED_COMMENT, INCLUDE_FILE_NOT_FOUND, UNDEFINED_ACTION, INTEGER_TOO_BIG, NEGATIVE_EXPONENT, DIGIT_EXPECTED, INTEGER_WITH_EXPONENT_TOO_BIG, EXTENDED_DIGIT_EXPECTED, ILLEGAL_BASED_DIGIT, BASED_INTEGER_TOO_BIG, APOSTROPHE_EXPECTED, CHAR_EXCEEDS, ILLEGAL_STRING_ESCAPE, WRONG_NUMERICAL_ESCAPE, WRONG_STRING_CONTINUATION, STRING_EXCEEDS, NAME_EXPECTED, INTEGER_EXPECTED, STRING_EXPECTED and REDECLARATION respectively. The program chkerr.sd7, the manual and the homepage have been adjusted to use the new error names.
  • Documentation comments have been improved in float.s7i, reference.s7i, stdio.s7i, string.s7i and reflib.c.... read more
Posted by Thomas Mertes 2025-05-16

New Seed7 Release 2025-03-25

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • The compilation with s7c has been fixed. Many thanks to Cheap-Ad9743 for pointing out that the linker issued the error "undefined symbol 'objectFileName'" under Windows.
  • An answer concerning the minimum array index has been added to the FAQ.
  • The new test program chkerr.sd7, which checks for parsing errors, has been added. The program chk_all.sd7 has has been adjusted to consider the new program chkerr.sd7.
  • The library zip.s7i has been improved to use code page 437 if the flag ZIP_FILE_NAME_IS_UTF8 is not set.
  • The library zip.s7i has been improved to support the decryption of encrypted ZIP files.
  • In charsets.s7i the cp_*g code pages have been changed to map all control characters to graphic characters.
  • The set ascii_control_char has been added to chartype.s7i.
  • The handling of error messages in calc7 has been improved to use the function getError().
  • The exception handling in calc7 has been improved to include DATABASE_ERROR, GRAPHIC_ERROR and ILLEGAL_ACTION.
  • Support for the function str(aFloatNumber, SCIENTIFIC) has been added to float.s7i. The function converts a float to a string in scientific notation where trailing zeros in the fractional part are omitted.
  • Tests for the function str(aFloatNumber, SCIENTIFIC) have been added to chkflt.sd7.
  • Tests for based integer literals have been added to chkint.sd7.
  • In chkjson.sd7 tests have been added for the function category(), when it is applied to jsonObject and jsonArray elements.
  • In integer.s7i and string.s7i the operator lpad0 has been changed such that padSize refers to the number of digits (without sign). For numbers without + or - sign the behavior of lpad0 stays the same.
  • The tests of lpad0 in chkint.sd7 and chkstr.sd7 have been adjusted to the new behavior of the lpad0 operator for negative numbers.
  • The time.s7i functions str(), strDate(), strDateTime(), str_yyyy_mm_dd(), str_yy_mm_dd(), str_mm_dd_yyyy(), str_mm_dd_yy(), str_dd_mm_yyyy(), str_dd_mm_yy(), str_d_m_yyyy() and str_d_m_yy() now insert a sign for negative years. Besides that the number of year digits stays unchanged. This is a consequence of the changed behavior of the lpad0 operator.
  • The test program chktime.sd7 has been adjusted to use the new behavior of the time to string conversion functions.
  • In progs.s7i in the functions parseFile() and parseStri() the 'protFileName' parameter has been replaced by a 'errorFile' parameter.
  • In progs.s7i the functions parseStri() with a bstring parameter have been added.
  • Support for the function getError() has been added to progs.s7i.
  • In syntax.s7i the new system variable f_param has been introduced.
  • The parsing error test file err.sd7 has been improved.
  • The Seed7 compiler (s7c.sd7) has been improved:
    • Definitions of propertyType and descriptorUnion have been added to the generated C code.
    • The function assignArrayValue has been improved.
  • The configuration values USE_ID_NAME_CHUNK_ALLOCS, HEAP_STATISTIC_AT_PROGRAM_EXIT, SHOW_OBJECT_MEMORY_LEAKS, WITH_BIGINT_CAPACITY and WITH_PROPERTY_FREELIST have been added to config.h.
  • Memory leaks in the parser have been fixed. The leaks have been fixed in expr.c, name.c, parser.c and prclib.c.
  • Several improvements have been done in name.c:
    • The function get_object() has been changed to set defined_object to NULL if an object is declared twice.
    • The functions free_name() and free_form_param_list() have been added.
    • The parameters file_number and line have been added to eval_name_list().
    • In match_name_list() and eval_name_list() parameters are only appended to matched_name_list or name_list if no error occurred.
    • The functions find_name() and search_name() have been changed to use pop_stack() (which frees objects) instead of down_stack().
    • The functions dollar_parameter() and dollar_inst_list() have been improved to fix memory leaks in case of a parsing error.
  • The function eval_expression() has been removed from exec.c and the function eval_type() has been added to name.c as a replacement.
  • In parser.c the function decl_value() has been improved to free init_expression with free_expression().
  • In parser.c the function decl_name() has been improved to free object_name with free_expression().
  • In numlit.c in the function readFloat() the code to read float literals has been refactored.
  • In symbol.c the function close_symbol() has been improved to free the bigInteger symbol value.
  • In actutl.c the function freeActPtrTable() has been added.
  • In literal.c the function skip_lines() has been added. This improves the test for string continuations. The error messages for string continuations have been improved as well.
  • In scanner.c the functions skip_whitespace(), skip_char() and skip_past_char() have been added. They are used in analyze.c and expr.c to skip over characters if an error has been detected.
  • In scanner.c the function scan_eof() has been improved to count the lines correctly if EOF is not preceded by a newline.
  • Several improvements have been done in prg_comp.c:
    • The functions free_obj_and_prop(), prgBStriParse() and prgGetError() have been added.
    • The function interpret() has been improved to free the arguments array after the program has been executed.
    • The functions prgErrorCount(), prgGlobalObjects(), prgMatch(), prgMatchExpr(), prgName(), prgPath(), prgSyobject() and prgSysvar() have been improved to raise RANGE_ERROR if the given program is NULL.
    • The function prgDestr() has been improved to free when_set_objects, errorFile, errorList, substituted_objects, when_value_objects, struct_objects, objectNumberMap, typeNumberMap and fileList.
  • In ref_data.c the function refFile(), refNum() and refStr() have been refactored.
  • In typ_data.c the function typNum() has been refactored.
  • Several improvements have been done in analyze.c:
    • The function analyzeBString() has been added.
    • The function declAny() has been improved to process declExpression only if it is not NULL.
    • The function declAny() has been improved to write an error if an expected expression is missing.
    • The function analyzeProg() has been improved to check for a BOM also when strings are parsed.
    • The function analyzeProg() has been improved to always reset the currentlyAnalyzing flag at the end of analyzeProg().
    • A check if system variables are types or exceptions has been added. The errors TYPE_EXPECTED and EXCEPTION_EXPECTED might be triggered.
    • The function declAny() has been improved such that the parser executes only const declarations after a parsing error.
  • In analyze.c and type.c the fail_flag is set to FALSE before writing the error message.
  • In analyze.c, prg_comp.c, ref_data.c and typ_data.c the object- (objectNumberMap) and type-number map (typeNumberMap) has been moved to the program object (progStruct). These two maps are freed by prgDestr().
  • In analyze.c, infile.c, libpath.c and ref_data.c the list of source files (fileList) has been moved to the program object. The source file data is freed by removeProgFiles() which is called from prgDestr().
  • In match.c the function substitute_params() has been changed to gather the substituted objects (substituted_objects) in the program object. The objects are freed by prgDestr().
  • In dcllib.c the function dcl_elements() has been improved to save a list of struct elements (struct_objects) in the program object. The struct objects and properties created by dcl_elements() are freed by prgDestr().
  • The file error.c has been refactored to store a list of parser errors (errorList) in the program object. The errors can be fetched with the function prgGetError(). The parser errors are freed by prgDestr().
  • In match.c the function substitute_params() has been improved to consider errors. The functions dcl_const() and dcl_var() call substitute_params() and raise the corresponding exception if an error is returned.
  • In syntax.c the function def_statement_syntax() has been changed to set token_list_end to NULL if a literal is encountered instead of an identifier.
  • The new source file msg_stri.c has been added. It contains functions to append various types to a string. The functions are used in error.c. The makefiles have been adjusted to compile msg_stri.c.
  • The error messages SYSTEM_MAIN_MISSING (missing system declaration for main) and ESSENTIAL_INCLUDE_FAILED (failed to include essential file) have been moved from analyze.c to error.c.
  • Several improvements have been done in error.c:
    • The functions freeError(), freeErrorList(), showError(), newError(), appendErrorToProg(), toOutputString(), computeColumnMarkerPos(), writeString(), writeChar(), writeNewline(), writeError(), finalizeError(), storeColumnNumber(), readLineFromCurrentFile(), storeLineOfCurrentFile(), storeLineFromBuffer(), storeLineFromFile(), findLineEndAndStoreLine(), storeLineOfOtherFile(), storePositionedErrorLine(), storeErrorLine(), setPlace(), setPlaceForObject(), setPlaceForFileNumber() and setPlaceOfError() have been added.
    • The functions read_ustri8_line(), print_stri(), read_and_print_line(), printLineOfCurrentFile(), printLineFromBuffer(), printLineFromFile(), findLineEndAndPrintLine(), printLineOfOtherFile(), print_line(), print_error_line(), write_place(), place_of_error(), write_symbol(), write_type(), write_name_list(), write_object_with_parameters() and write_object() have been removed.
    • The functions undef_err() and err_string() have been renamed to undefErr() and err_ustri() respectively.
    • The function ustri8_buffer_to_stri() has been refactored to stri8_buffer_to_stri().
  • Improvements have been done in infile.c:
    • The function openInfile() has been improved to check if fopen() opened a directory.
    • The function openString() has been renamed to openBString().
    • The function openBString() has been improved to support the case that USE_ALTERNATE_NEXT_CHARACTER is 0.
    • A progType parameter has been added to get_file_name() and get_file_name_ustri().
    • The function objectFileName() has been added.
  • In dcllib.c the functions dcl_in1() and dcl_in2() have been changed to return f_param with NULL if the kind of in-parameter is unspecified. The function eval_name_list() removes these f_param objects.
  • In blockutl.c the function free_block() has been improved to free the properties of local constants.
  • In blockutl.c the function free_local_consts() has been added. This function is used by free_block(), prc_local() and prc_res_local().
  • The program chkccomp.c and the include file common.h have been improved to define FMT_E_PRECISION.
  • In arr_rtl.c the function freeStringArray() has been added.
  • In hsh_rtl.c the function freeGenericHash() has been added. This function is used by prgDestr() to free objectNumberMap and typeNumberMap.
  • In int_rtl.c the function intLpad0() has been changed such that padSize refers to the number of digits (without sign).
  • In str_rtl.c the functions strLpad0() and strLpad0Temp() have been changed such that padSize refers to the number of non-sign characters.
  • In flt_rtl.c the functions doubleToFormatE() and fltStrScientific() have been added.
  • Improvements have been done in big_rtl.c:
    • FREE_BIG2() has been introduced and FREE_BIG() has been refactored to consider the capacity.
    • A memory leak in bigLog10() has been fixed.
    • The heap statistic for bigInteger has been improved.
    • The function closeBig() has been added to big_rtl.c and big_gmp.c.
    • In big_rtl.c and big_gmp.c the function bigStrDecimal() has been introduced. This function returns NULL if there is not enough memory to represent the result. It is used in msg_stri.c, numutl.c, sql_cli.c, sql_fire.c, sql_my.c, sql_oci.c and sql_tds.c.
  • In itflib.c the function itf_destr() allows now that take_struct(old_value) is NULL.
  • In blnlib.c the functions bln_and(), bln_or() and bln_ternary() have been improved to free temporary boolean values.
  • In chkbool.sd7 tests where temporary booleans are freed have been added.
  • In cmdlib.c, sqllib.c and timlib.c an initialization of is_dst has been added to avoid the use of an uninitialized value in case of an error.
  • In arrlib.c the function arr_insert() has been improved to consider the temp flag of an element to be inserted. A temporary element is made permanent and it is inserted into the array.
  • in fltlib.c the function flt_str_scientific() has been added.
  • In strlib.c the function str_lpad0() has been improved to call strLpad0Temp() or strLpad0().
  • In prglib.c the functions prg_bstri_parse() and prg_get_error() have been added.
  • The actions FLT_STR_SCIENTIFIC, PRG_BSTRI_PARSE and PRG_GET_ERROR have been added to primitiv.c.
  • In s7.c the functions freeOptions() and main() have been changed to free arg_v correctly.
  • Several improvements have been done in exec.c:
    • The function exec_dynamic() has been improved to avoid that the interpreter examines objects in the free-list. The TEMP flag is cleared before calling exec_call(). Afterwards the TEMP flag is restored with the help of a list of temp_values.
    • In the function exec_dynamic() memory is freed if match_prog_expression() or match_object() fails.
    • The function do_exec_call() has been improved to call leaveExceptionHandling() instead of using set_fail_flag(FALSE).
  • In executl.c, doany.c and name.c calls of copy_expression() and free_expression() have been added around match_expression().
  • In listutl.c the function free_expression_list() has been added. This function is used in prc_case(), prc_case_def(), prc_case_hashset() and prc_case_hashset_def() before when_values are turned into a SETOBJECT or HASHOBJECT.
  • Several improvements have been done in prclib.c:
    • The functions prc_case(), prc_case_def(), prc_case_hashset() and prc_case_hashset_def() have been improved to free temporary set objects from the when-parts of case-statements. The set object data (when_value_objects and when_set_objects) is gathered in the program object and freed by prgDestr().
    • The functions prc_begin(), prc_local(), prc_res_begin(), prc_res_local(), prc_return(), prc_return2(), prc_varfunc() and prc_varfunc2() have been improved to free parameters, function results, local constants, local variables, and the function body if an error occurred.
    • The functions prc_repeat(), prc_repeat_noop(), prc_while() and prc_while_noop() have been improved to free temporary boolean values with FREE_OBJECT().
  • In chkprc.sd7 test cases for while- and repeat-loops with temporary boolean values have been added.
  • Several improvements have been done in data.h:
    • The flag is_type_type has been added to typeStruct. This flag is initialized by new_type() in typeutl.c. The flag is set by decl_value() in parser.c. The flag is used by eval_type() in name.c to assure that an expression returns a type.
    • A definition of parseErrorStruct has been added.
    • The fields fileCounter, fileList, writeErrors, errorFile, errorList, errorListEnd, objectNumberMap, nextFreeObjectNumber, typeNumberMap, nextFreeTypeNumber, substituted_objects, struct_objects, when_value_objects and when_set_objects have been added to the progStruct.
    • The field owningProg has been removed from the inFileStruct.
  • In syvarutl.h the new system variable f_param has been introduced.
  • In heaputl.h and flistutl.c the heap statistic has been improved:
    • Now it distinguishes between arrayType and rtlArrayType.
    • The rtl hash-tables and rtl hash-table elements are shown now.
    • The bigInteger free lists are considered now.
    • The parse errors (parseErrorRecord) have been added.
    • The list of free property elements is shown now.
    • The c1 and l1 parameters have been removed from the macro HEAP_REALLOC_STRI().
  • In flistutl.c the functions allocObject(), freeObject() and listAllObjects() have been added. These functions are used if SHOW_OBJECT_MEMORY_LEAKS is 1.
  • In flistutl.c and flistutl.h a list of free propery elements has been introduced. In atom.c, blockutl.c, entutl.c, name.c and prg_comp.c usages of ALLOC_RECORD and FREE_RECORD have been replaced with ALLOC_PROPERTY and FREE_PROPERTY.
  • In striutl.c the function stri8_to_stri() has been introduced. It converts an UTF-8 encoded string to an UTF-32 encoded string. It is used in error.c and str_rtl.c.
  • In traceutl.c the tracing has been improved in trace1(), printobject() and print_real_value(). The improvements consider SYMBOLOBJECT, INTERFACEOBJECT, UNUSED objects, properties and file values.
  • In error.h and and progs.s7i the parser errors have been reordered. The errors NO_SOURCEFILE and EVAL_TYPE_FAILED have been removed. The errors ESSENTIAL_INCLUDE_FAILED, SYSTEM_MAIN_MISSING, PARAM_DECL_OR_SYMBOL_EXPECTED and EXCEPTION_EXPECTED have been added. The errors FALSE_INFIX_PRIORITY and FALSE_PREFIX_PRIORITY have been renamed to REDECLARED_INFIX_PRIORITY respectively REDECLARED_PREFIX_PRIORITY. The manual and the homepage have been adjusted to use the new error numbers.
  • The AND_SO_ON_... definitions have been moved from striutl.c to striutl.h. They are used in msg_stri.c, numutl.c and striutl.c.
  • In findid.c in the functions clean_idents() and write_idents() the parameter currentProg has been renamed to aProg. In the function wri_binary_ident_tree() the parameter aProg has been added.
  • In runerr.c the function raise_with_arguments() has been improved to return the exception.
  • In runerr.c a progType parameter has been added to uncaught_exception().
  • In runerr.h the global variables fail_file_number and fail_line_number have been added. Functions in dcllib.c, parser.c and runerr.c have been changed to use the new variables.
  • The function raise_with_obj_and_args() has been added to runerr.c. Several primitive actions call other primitive actions. In this case the global variable curr_exec_object has been changed and raise_with_arguments() would refer to the wrong object.
  • Primitive action functions in dcllib.c, exec.c, hshlib.c and prclib.c have been changed to use raise_with_obj_and_args() instead of raise_with_arguments(). The changed functions copy curr_exec_object to a local variable.
  • Interpreter and compiler have been improved to support the actions FLT_STR_SCIENTIFIC, PRG_BSTRI_PARSE and PRG_GET_ERROR.
  • In con_cap.c, con_con.c, con_cur.c, con_dos.c, con_drv.h, con_emc.c, con_inf.c, con_rtl.c, con_rtl.h, con_tcp.c, con_wat.c, con_win.c and con_x11.c the name of the console function parameter 'count' has been changed to 'numLines' to avoid shadowing a global declaration.
  • In con_win.c and fil_win.c the name of the local variable 'count' has been changed to 'numEventsRead' to avoid shadowing a global declaration.
  • In cmd_win.c the variable substituteNameLength is cast to memSizeType for the ALLOC_OS_STRI macro. This avoids a warning.
  • Logging functions have been added or improved in analyze.c, arr_rtl.c, dcllib.c, error.c, exec.c, executl.c, hsh_rtl.c, itflib.c, msg_stri.c, name.c, parser.c, prg_comp.c, ref_data.c, reflib.c, sctlib.c, set_rtl.c, setlib.c, str_rtl.c, syntax.c and type.c.
  • Documentation comments have been improved in duration.s7i, integer.s7i, string.s7i, time.s7i, progs.s7i, zip.s7i, big_gmp.c, con_cap.c, con_con.c, con_cur.c, con_dos.c, con_inf.c, con_tcp.c, con_wat.c, con_win.c, con_x11.c, int_rtl.c, intlib.c, match.c, prg_comp.c, str_rtl.c and strlib.c.... read more
Posted by Thomas Mertes 2025-03-25

New Seed7 Release 2025-01-11

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • The answer concerning scanner functions in the FAQ has been improved.
  • The new library scantoml.s7i with string and file scanner functions for TOML symbols has been added.
  • SHA-3 message digest functions have been added to the msgdigest.s7i library.
  • The new library bzip2.s7i has been added. This library supports the decompression of BZIP2 compressed data.
  • The new library archive.s7i has been added. This library supports opening TAR, CPIO, ZIP, RPM and AR archives. Which archive to open is decided either by magic number or by the file extension.
  • The library zip.s7i has been improved:
    • Support for the compression methods Shrink, Deflate64, bzip2, LZMA, Zstandard and XZ has been added.
    • Support for references to existing files in the archive (identified with compression method 92) has been added.
    • When opening a ZIP archive the ZIP magic is checked.
    • Constants for compression methods and extra field IDs have been introduced.
    • Corrupt extra fields are ignored now and the function writeExtraField() has been improved.
    • Now the functions inflate() and inflate64() are invoked with the file as parameter. This saves memory if the comressed data is huge.
    • The functions initializeFileReferenceMap, getReferencePaths, lzwDecompressShrink, getReference and readDataDescriptor have been added.
    • The write permission obtained with getFileMode() when the host system is DOS have been changed.
  • The tar7 example program has been improved:
    • Support to list, extract and create ZIP, RPM, CPIO and AR archives has been added.
    • Support to list and extract BZIP2 compressed TAR archives has been added.
  • Support for the enhanced deflate (deflate64) compression has been added to the library inflate.s7i.
  • In inflate.s7i the functions decodeLength and decodeDistance have been refactored.
  • In deflate.s7i the function deflateBlock() has been refactored and renamed to deflate(). The function deflate() now creates multiple deflate blocks. Calls of deflateBlock() in gzip.s7i have been adjusted.
  • The function lzwDecompressShrink has been added to the library lzw.s7i.
  • The decompression functions in lzw.s7i have been improved to use fixed size arrays.
  • In bitdata.s7i the function eof() has been added for the types lsbInBitStream and msbInBitStream.
  • In bitdata.s7i the performance of getBits(msbInBitStream) has been improved by 20% and the performance of getBits(lsbInBitStream) has been improved by 15%.
  • In chkbitdata.sd7 tests for getBit() and getBits() have been improved and tests for bit-stream eof() have been added.
  • In chktime.sd7 tests for the string to time conversion have been added.
  • The new test program chktoml.sd7, with tests for the TOML scanner functions, has been added.
  • Support for the CRC-32 cyclic redundancy check of BZIP2 has been added to the library crc32.s7i.
  • In magic.s7i support for MAGIC_BZIP2 has been added to the function getMagic.
  • The library tar.s7i has been improved to process UTF-8 paths only if TAR_MAGIC is okay.
  • The library tar_cmds.s7i has been improved to support listing, extracting and creating ZIP, RPM, CPIO and AR archives.
  • Support to list and extract BZIP2 compressed TAR archives has been added to tar_cmds.s7i.
  • The library rpm.s7i has been improved to support a BZIP2 compressed payload.
  • In rpm.s7i the function readLead() has been improved to check if packageType is in the allowed range.
  • The function xzDecompress has been added to the xz.s7i library.
  • The function zstdDecompress has been added to the zstd.s7i library.
  • The function lzmaDecompress has been added to the lzma.s7i library.
  • The library gif.s7i has been improved to read past unknown extension blocks.
  • The library jpeg.s7i has been improved to ignore a superfluous restart marker after the last ECS segment.
  • The library png.s7i has been improved to only raise RANGE_ERROR if the CRC of a critical chunk is incorrect.
  • The json.s7i library has been improved:
    • A for-each-loop which loops over the keys has been added.
    • A for-each-loop which loops over keys and values has been added.
    • Functions to create a JSON object have been added.
  • In scanjson.s7i the function getJsonString has been refactored.
  • In chkjson.sd7 the tests of getJsonString() and getJsonNumber() have been refactored. Tests for getJsonNumber() have been added.
  • Tests for JSON strings with \u parts have been added to chkjson.sd7.
  • The function createMsbHuffmanDecoder with codeLengths parameter has been added to the library huffman.s7i.
  • In huffman.s7i the function createMsbHuffmanDecoder has been refactored to use a for-loop with a repeat count. The unused local variable currentCode has been removed.
  • In ccittfax.s7i the function addCode(msbHuffmanDecoder, ...) has been refactored to use a for-loop with a repeat count.
  • The functions ceil() and floor() have been moved from the math.s7i library to the float.s7i library.
  • The function round10() has been added to the float.s7i library.
  • The library httpserv.s7i has been improved to leave the loop which reads the HTTP header after the double CR LF sequence.
  • The config value WITH_RTL_ARRAY_CAPACITY has been added to the library cc_conf.s7i and to the programs confval.sd7 and s7c.sd7.
  • The documentation of the parse operator hs been improved in bigint.s7i and integer.s7i.
  • The documentation of the digits and sci operators has been improved in bigint.s7i, bigrat.s7i, float.s7i, integer.s7i and rational.s7i.
  • The documentation of the exp operator in float.s7i has been improved.
  • The documentation of the bin64 conversion functions in bin64.s7i has been improved.
  • The documentation of the mode parameter in file open functions has been improved.
  • The Seed7 compiler (s7c.sd7) has been improved:
    • Special cases of string append (&:=) now use the functions strAppendChMult() and strAppendZeroMult().
    • Optimizations for bytes2Int(aString, SIGNED, BE) and bytes2Int(aString, SIGNED, LE) have been added.
    • In arr_act.s7i the function process (ARR_IDX, ...) has been improved to avoid subtracting minIdx if it is zero.
  • Tests for string append with the mult operator (e.g.: stri &:= "x" mult n;) have been added to chkstr.sd7.
  • Tests for the bytes2Int(aString, SIGNED, BE) and bytes2Int(aString, SIGNED, LE) optimizations have been added to chkint.sd7.
  • In filesys.s7i and osfiles.s7i the deprecated function readlink() has been removed. The function readLink() should be used instead.
  • In unicode.s7i the deprecated functions striToUtf8() and utf8ToStri(), have been removed. The functions toUtf8() and fromUtf8() should be used instead.
  • In graph.s7i the deprecated function DRAW_FLUSH() has been removed. The function flushGraphic() should be used instead.
  • In graph.s7i the deprecated function setCloseAction() has been removed. Instead of setCloseAction(popupWindow, RETURN_KEY); the statement selectInput(popupWindow, KEY_CLOSE, TRUE); should be used.
  • In draw.s7i the deprecated put() functions with PSET and XOR parameter have been removed. The functions without PSET respectively XOR should be used instead.
  • Support for the action DRW_SET_CLOSE_ACTION has been removed from interpreter and compiler.
  • In arr_rtl.c the logging functions have been improved.
  • The files arrlib.c, arr_rtl.c, cmd_rtl.c, config.h, heaputl.h, libpath.c, strlib.h and str_rtl.c have been prepared for arrays with capacity.
  • The files cmd_rtl.c, data.h and data_rtl.h have been changed to support the config value WITH_RTL_ARRAY_CAPACITY.
  • In drw_emc.c the function reloadPage has been changed to wait for a quarter of a second.
  • The functions strAppendChMult() and strAppendZeroMult() have been added to str_rtl.c.
  • Documentation comments have been improved in bigint.s7i, bigrat.s7i, clib_file.s7i, external_file.s7i, float.s7i, ftp.s7i, huffman.s7i, integer.s7i, json.s7i, lzma.s7i, lzw.s7i, tar_cmds.s7i, fillib.c and fil_rtl.c.... read more
Posted by Thomas Mertes 2025-01-11

New Seed7 Release 2024-11-18

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • A new Seed7 installer for Windows (seed7_05_20240812_win.exe) has been released. This installer correctly identifies if the Windows operating system is 32- or 64-bit. Many thanks to Bruce Axtens and Simon Dash for reporting errors caused by 32-bit Seed7 installations (running out of memory with bigfiles.sd7 and a failing test with chkarr.sd7).
  • In idxarray.s7i the type 'array [integer] baseType' has been mapped to 'array baseType'. Many thanks to Simon Dash for reporting that the use of 'array [integer] baseType' triggered errors.
  • In httpserv.s7i the function getHttpRequest() has been improved to assure that something can be read from the socket without waiting.
  • In fixarray.s7i fixed size arrays have been improved to support for-each-loops.
  • In bitdata.s7i, the types lsbOutBitStream and msbOutBitStream have been introduced. These types support the functions putBit(), putBits(), length(), truncate(), flush() and getBytes().
  • The function putBits(lsbOutBitStream) is 22% faster than the deprecated function putBitsLsb().
  • The function putBits(msbOutBitStream) is 24% faster than the deprecated function putBitsMsb().
  • Tests for lsbOutBitStream and msbOutBitStream have been added to chkbitdata.sd7. The tests check putBit(), putBits(), length() and truncate().
  • Tests have been added to chkbitdata.sd7. The tests check the addition of zero bit sequences to a bit stream.
  • The library lzw.s7i has been improved to use a lsbOutBitStream or a msbOutBitStream for the LZW compression.
  • In bitdata.s7i the types lsbBitStream and msbBitStream and the functions openLsbBitStream and openMsbBitStream are deprecated. The types lsbInBitStream and msbInBitStream and the functions openLsbInBitStream and openMsbInBitStream should be used instead.
  • Support for Huffman encoding has been added to the huffman.s7i library.
  • The libraries ccittfax.s7i, gzip.s7i, huffman.s7i, inflate.s7i, lzw.s7i and zstd.s7i have been changed to replace the deprecated type lsbBitStream with lsbInBitStream. The deprecated function openLsbBitStrea has been replaced with openLsbInBitStream as well.
  • The libraries ccittfax.s7i, huffman.s7i, jpeg.s7i, lzw.s7i and tiff.s7i have been changed to replace the deprecated type msbBitStream with msbInBitStream. The deprecated function openMsbBitStream has been replaced with openMsbInBitStream as well.
  • Support for the dynamic deflate compression has been added to the library deflate.s7i.
  • In deflate.s7i the functions putDistance and encodeLz77Distance have been refactored to use a case statement instead of an if-elsif-chain. This improves the performance of encodeLz77Distance by 30%.
  • The libraries deflate.s7i and gzip.s7i have been improved to use a lsbOutBitStream for the DEFLATE compression.
  • In inflate.s7i the function decodeDynamicHuffmanCodes() has been refactored.
  • In inflate.s7i and ccittfax.s7i the decoder names have been refactored.
  • In huffman.s7i, inflate.s7i and jpeg.s7i the functions createHuffmanTableMsb and createHuffmanTableLsb have been renamed to createMsbHuffmanDecoder respectively createLsbHuffmanDecoder.
  • In huffman.s7i, ccittfax.s7i, inflate.s7i and jpeg.s7i the undocumented types msbHuffmanTable and lsbHuffmanTable have been renamed to msbHuffmanDecoder respectively lsbHuffmanDecoder.
  • In ccittfax.s7i type, variable, parameter and function names have been refactored.
  • In bitdata.s7i the functions putBitLsb(), putBitsLsb(), putBitMsb() and putBitsMsb() with a string or file as parameter are deprecated. The functions with the types lsbOutBitStream and msbOutBitStream should be used instead.
  • The new library compress.s7i has been added. This library supports compression and decompression with PackBits (Tiff version and PDF version).
  • The library tiff.s7i has been improved to use the new function fromPackBits() instead of unpackBits(). The declaration of unpackBits() in tiff.s7i has been removed.
  • The declaration of the unused type tiffIDFEntry has been removed from tiff.s7i.
  • The functions toAsciiHex() and fromAsciiHex() have been added to the library encoding.s7i.
  • In encoding.s7i the function toAscii85() has been fixed to handle the last partial group correctly.
  • In encoding.s7i the function fromPercentEncoded() has been improved to scale better with the string length.
  • In encoding.s7i the function fromUrlEncoded has been changed to avoid a change of pos in a for-key-loop.
  • In lzw.s7i the LZW compressions have been fixed to write the end code with the correct number of bits. If necessary the clear code is written before the end code.
  • In gzip.s7i the function gzcompress() has been fixed to use the correct header.
  • The library deflate.s7i has been improved to use 'fixLen' instead of 'len' for the Lz77 compression in the function deflate().
  • In charsets.s7i support for PostScript Standard Encoding has been added.
  • In charsets.s7i the code page mac_os_roman has been fixed.
  • The library ico.s7i has been improved to support ICO files with a PNG image.
  • In pbm.s7i the reading of a PBM (portable bitmap) image files has been fixed to avoid an INDEX_ERROR if the image width is a multiple of 8.
  • In pbm.s7i, pgm.s7i and ppm.s7i functions to read image lines have been introduced. These functions use a 1D pixelArray instead of a 2D pixelImage array. This avoids array index checks in the innermost loop.
  • The function setPixels() has been added to the library pixelimage.s7i. This function uses a 1D pixelArray parameter.
  • The library ccittfax.s7i has been improved to use the function setPixels().
  • In ccittfax.s7i the functions processCcittFaxRow(), processCcittT4Fax2dRow() and processCcittT4Fax1dRow() have been improved to use the 1D array pixelArray instead of the 2D array pixelImage.
  • In ccittfax.s7i the fixed base array type ccittFaxValues has been introduced for A and B values.
  • The unused functions putBits0Msb, putBits1Msb and ccittFaxDecode have been removed from ccittfax.s7i.
  • In huffman.s7i and ccittfax.s7i the element maxBitWidth has been renamed to maximumCodeLength.
  • In huffman.s7i the function computeSymbolsWithCodeLength() has been introduced. This function is used by createLsbHuffmanDecoder(), reduceMaximumHuffmanCodeLength() and createHuffmanEncoder().
  • In huffman.s7i parameter and variable names have been refactored.
  • In zstd.s7i the type zstdHuffmanDecodingTable() has been renamed to zstdHuffmanDecoder(). Variables of this type have been renamed from 'table' to 'decoder'.
  • In hash.s7i documentation for the hash update function has been added.
  • Tests for the hash update function have been added to chkhsh.sd7.
  • In exif.s7i The function readExifData has been changed to be usable from png.s7i. The call of readExifData in jpeg.s7i has been adjusted.
  • The library png.s7i has been improved:
    • The Exif orientation is considered in PNG images.
    • Support for writing PNG images has been added.
    • The function computeBytesPerPixel uses a case-statement instead of an if-elsif-chain.
    • Constants for the PNG color type (PNG_COLOR_TYPE_GRAYSCALE, PNG_COLOR_TYPE_RGB, PNG_COLOR_TYPE_PALETTE, PNG_COLOR_TYPE_GRAYSCALE_ALPHA and PNG_COLOR_TYPE_RGB_ALPHA) have been introduced.
    • The functions fillPngImageLine1Bit(), fillPngImageLine2Bit(), fillPngImageLine4Bit(), fillPngImageLine8Bit(), fillPngImageLine16Bit(), fillPngImageLine24Bit() and fillPngImageLine48Bit() have been introduced. The line by line processing of images improves the performance by up to 3%.
  • The library gif.s7i has been refactored. The functions showHeader, showImageHeader, showExtension, readGraphicControlExtension and readApplicationExtension have been introduced. The type gifData has been introduced as well.
  • The library gif.s7i has been changed to process images line by line. This improves the performance by 2% to 4%.
  • The function readGifColorMap has been introduced in gif.s7i. This function is used in readHeader() and readImageHeader().
  • The library tar_cmds.s7i has been fixed to write the TAR EOF marker just once.
  • In crc32.s7i a fixed size array is used for the crc32Table.
  • Some icon pictures have been added to pic32.s7i.
  • In strifile.s7i the functions getwd() and getln() have been improved to ignore the '\r' of a "\r\n" sequence.
  • Definitions of TLS extensions have been added to tls.s7i and showtls.s7i.
  • In dialog.s7i the function bossMode() has been improved to use a sub-window.
  • In dialog.s7i the undocumented function buttonWindow() has been deprecated. The function clickedWindow() should be used instead. The programs carddemo.sd7, klondike.sd7, pairs.sd7, panic.sd7 and sokoban.sd7 have been changed to use clickedWindow() instead of the deprecated function.
  • Support for the PackBits compression has been added to calc7.sd7.
  • The program castle.sd7 has been improved to store castle.dat as a bstring named castleData in the program.
  • Several improvements have been made in the program panic.sd7:
    • Mouse clicks can be used as commands in addition to keyboard commands.
    • Sub-windows are used for player and monster images.
    • The await time is recomputed if it has already passed.
    • Unnecessary calls of allObjectsInvisible() and allObjectsVisible() have been removed.
    • The function process_command uses a case-statement instead of an if-elsif chain.
  • Several improvements have been made in the program dnafight.sd7:
    • Selecting bacteria and starting the simulation can be done with the mouse.
    • Constants for line and column delta have been introduced.
    • A glitch when positioning bacteria has been fixed.
  • In the program lander.sd7 a glitch in advanced lander has been fixed.
  • Several improvements have been made in the program sokoban.sd7:
    • Mouse clicks can be used to trigger a movement.
    • Clickable buttons for commands have been introduced. This allows Sokoban to be played without a keyboard.
    • The congratulations have been moved from line 31 to line 13.
    • The position where a level number can be entered has been changed.
  • In klondike.sd7 the destination places are now marked with a rectangle, and the bottom of the card pile is marked with a ring.
  • In klondike.sd7 mouse wheel keys are now allowed during the victory animation.
  • Several improvements have been made in the program pairs.sd7:
    • An exit button has been added.
    • The mouse buttons 2 to 5 are ignored.
    • A congratulation is displayed when the board is cleared.
    • Several games can be played in succession.
  • A congratulation screen has been added to mahjong.sd7.
  • A congratulation has been added to shisen.sd7.
  • The program wator.sd7 has been improved to check if the value entered is a number.
  • An exit button has been added to keyboard test program gkbd.sd7.
  • The Seed7 compiler (s7c.sd7) has been improved:
    • The function handleOverlappingStrings() has been added to s7c.sd7. This function determines if the head of a new string is the same as the tail of the existing striChars. The old code searched for one character from the end of striChars. The new function searches for up to 8 character from the end of striChars. This improves the performance of this functionality considerably.
    • The functions write_striChars() and write_bstriChars() have been improved to directly write to the file c_prog (instead of appending the data to a string variable). This avoids a MEMORY_ERROR for huge string and bstring constant tables.
    • Now functions are inlined if they are undeclared and calling a special action.
    • In comp/arr_act.s7i the prototype declaration for the ARR_TIMES operator has been fixed to use the parameter elementType.
    • In comp/intrange.s7i the function getIntRange() has been improved to avoid a potential endless recursion with compiler option -oc3.
    • In comp/const.s7i the constant constantExpressionCategories has been renamed to basicExpressionCategories.
    • The functions isPureExpression() and equalExpressions() have been added to comp/const.s7i.
    • In comp/str_act.s7i the functions process_str_substr_slice, process_str_substr_fixlen_slice and optimize_str_eq_of_substr_fixlen have been introduced.
    • The index checks for the action STR_SUBSTR_FIXLEN have been improved.
    • In comp/bin_act.s7i and comp/int_act.s7i a slice is used for the optimization of BIN_BYTES_BE_2_UINT, BIN_BYTES_LE_2_UINT, INT_BYTES_BE_2_UINT and INT_BYTES_LE_2_UINT.
    • An optimization for the comparison of two fixLen sub-strings has been added.
    • In comp/drw_act.s7i the support for the action DRW_SET_SIZE has been added.
    • In comp/ref_act.s7i a REF_ADDR pointer is cast to void *.
  • The function check_bstring_constants, which tests the compiler behavior if two bstrings overlap, has been added to chkbst.sd7.
  • Tests for the comparison of two fixLen sub-strings have been added to chkstr.sd7 and chkidx.sd7.
  • Interpreter and compiler have been improved to support the actions BIN_BYTES_BE_2_UINT, BIN_BYTES_LE_2_UINT and DRW_SET_SIZE.
  • The library bin64.s7i has been improved to use the actions BIN_BYTES_BE_2_UINT and BIN_BYTES_LE_2_UINT.
  • The function setSize() has been added to the graph.s7i library.
  • Tests for the conversion from string to bin64 have been added to chkbin.sd7. The program chk_all.sd7 has has been adjusted to consider the changes in chkbin.sd7.
  • In chkarr.sd7 the functions testFixArrayIndex() and testBaseArrayIndex() have been fixed to work correctly if POINTER_SIZE is 32.
  • The function getHexDigits() has been added to scanstri.s7i and scanfile.s7i.
  • Tests for getHexDigits() have been added to chkscan.sd7.
  • In chkccomp.c the tests for setjmp and sigsetjmp have been improved to recognize if they always return 0.
  • A mechanism to recognize timer throttling in the browser has been added to drw_emc.c and gkb_emc.c. A throttled program probably displays graphics in a newly opened tab instead of a popup. In this case, the old tab (where the program is running) is repurposed to display the graphics. To do that, the graphic content is moved from the newly opened tab to the old tab, and the newly opened tab is closed. This moves the focus from the newly opened tab to the tab where the program runs. This stops the throttling.
  • Several improvements have been done in drw_emc.c:
    • The functions pointerXPos() and pointerYPos() have been improved to work correctly for all browser windows. To do that, they use getWindowLeftPos() and getWindowTopPos().
    • In the function drwOpen a heuristic has been introduced to decide if a popup or a tab has been opened by window.open(). The heuristic assumes that a tab has been opened if the viewport scale is not 1. If the screenX and screenY position of the window is not at the requested place, it is also assumed that a tab has been opened.
    • The new function openDocumentTabAsWindow() has been introduced. It puts a canvas in the current browser tab and uses the canvas as a graphic window. When the program terminates, the current browser tab is reloaded.
    • The browser window property is_tab has been added. It is set by openDocumentTabAsWindow().
    • The function drwOpen has been improved to call openDocumentTabAsWindow() if window.open() opens a tab instead of a popup. Only the first call of drwOpen might invoke openDocumentTabAsWindow().
    • The function drwToTop has been improved to use canvas.focus() if windowObject.focus() is not available.
    • The function drwToBottom has been improved to insert the sub-window canvas after the main canvas. This way, it also works in tabs (if is_tab(parent) is TRUE).
    • The function closeWindow has been introduced. This function is used by drwFree() and moveWindowToDocumentTab().
    • The function closeWindow has been improved to deregister browser windows when they are freed with deregisterWindowFunction().
    • The function copyWindow() has been improved to save the window title before the window is removed.
    • The function copyWindow() has been improved to move sub-windows as well. This is done with the new function moveCanvas().
    • The function removeWindowMapping() has been introduced. This function is used by copyWindow().
    • The function getNameFromTitle has been introduced. It gets the JavaScript window name from the window title.
    • The function copyWindow() has been changed to return NULL if it fails. The functions gkbGetc() and waitOrGetc() will raise the exception GRAPHIC_ERROR if copyWindow() fails.
    • The function drwGetPixmap has been refactored to work without local imageData variable.
    • The style position of the main canvas of a window has has been changed to absolute. The main canvas has been changed to be the first child in the document.body of the window.
    • The functions clickedWindowLeftPos and clickedWindowTopPos have been renamed to getWindowLeftPos respectively getWindowTopPos.
    • The functions isSubWindow(), isTab(), closeWindow(), moveCanvas(), removeWindowMapping(), getNameFromTitle(), openDocumentTabAsWindow(), moveSubWindowsToDocumentTab(), moveWindowToDocumentTab(), windowIsInNewTab() and drwSetSize() have been added.
  • Several improvements have been made in gkb_emc.c:
    • Support for WebAssembly Web Worker threads of has been added. The macro USE_WASM_WORKERS decides if a worker thread is used. If window.crossOriginIsolated is FALSE (no web worker threads are available) the old code (without a worker thread) is used. Due to some errors in Emscripten USE_WASM_WORKERS is currently set to 0. For web workers, the HTTP server needs to set some values in the HTTP header:
      • Cross-Origin-Opener-Policy: same-origin
      • Cross-Origin-Embedder-Policy: require-corp and
      • Access-Control-Allow-Origin: *
    • Touch movements are now considered as movements with a pressed mouse key. This is needed to support mobile phones.
    • Calls of os_exit() have been removed from the async functions decodeBeforeunloadEvent(), decodeFocusEvent(), decodeVisibilitychange() and decodeUnloadEvent(). The functions gkbGetc() and waitOrGetc() call os_exit() instead.
    • In gkb_emc.c the functions gkbGetc() and waitOrGetc() have been improved to call os_exit() or raise an exception depending on the variables exitOrException and emc_err_info.
    • The functions decodeTouchstartEvent(), decodeTouchendEvent(), decodeTouchcancelEvent(), decodeTouchmoveEvent(), timerIsThrottled(), checkIfWindowIsInNewTab(), timeOver(), timeoutWorker(), setupTimeoutPromise(), freeTimeoutPromise(), terminateWorker() and startWorker() have been introduced.
    • A printf() has been removed from decodeUnloadEvent().
  • In pre_js.js a definition of deregisterWindowFunction has been added.
  • In tim_emc.c the function timAwait() has been improved to avoid waiting for 0 milliseconds.
  • In emc_utl.c, emc_utl.h, gkb_emc.c, gkb_win.c and gkb_x11.c the elements buttonWindow and button_window have been renamed to clickedWindow.
  • The function drwSetSize() has been added to drw_x11.c, drw_win.c drw_emc.c and drw_drv.h.
  • The function drw_set_size() has been added to drwlib.c and drwlib.h.
  • In gkb_x11.c in processEvents() a case for the buttonPress event has been added. This case triggers that inputReady() returns TRUE for a buttonPress event. The default case in processEvents() has been changed to ignore unspecified events (e.g. DestroyNotify).
  • Support for XResizeWindow has been added to fwd_x11.c, fwd_x11.h and x11_x.h.
  • In int_rtl.c and int_rtl.h the functions uintBytesBe2UInt() and uintBytesLe2UInt() have been added.
  • In str_rtl.c the function strCLit() has been improved to write octal character representations with a minimum of digits. The tests in chkstr.sd7 have been adjusted to the new behavior.
  • The actions BIN_BYTES_BE_2_UINT, BIN_BYTES_LE_2_UINT and DRW_SET_SIZE have been added to primitiv.c.
  • Documentation comments have been improved in bin64.s7i, bitdata.s7i, encoding.s7i, hash.s7i, huffman.s7i, lzw.s7i, strifile.s7i, drw_emc.c, hshlib.c and hsh_rtl.c.... read more
Posted by Thomas Mertes 2024-11-18

New Seed7 Release 2024-08-12

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • A new Seed7 installer for Windows (seed7_05_20240630_win.exe) has been released. This installer works without a previously installed gcc. Many thanks to Simon Dash for reporting that the old Seed7 installer for Windows was aborting.
  • The declaration processing for functions with parameters in name.c has been improved to leave original_name_list unchanged. Many thanks to Simon Dash for reporting an error which happened with array templates.
  • The run-time library has been improved to reliably raise FILE_ERROR if gets(), getln() or getwd() are called with a write only file. Many thanks to Joe Thompson for pointing out that the chkexc.sd7 test failed with MinGW (GCC 14.1).
  • The test of _wrename() and the definition of os_rename_orig has been removed from chkccomp.c. Many thanks to Liam O'Brien for pointing out that chkccomp.c could not define os_rename_orig on a new Windows 10 PC.
  • The library jpeg.s7i has been improved to use Exif data to change the orientation of an image if necessary. Many thanks to Johannes Gritsch for pointing out that pv7 displayed some images with the wrong orientation.
  • The new library elf.s7i has been added. This library supports the ELF executable and link format.
  • The new library pbm.s7i has been added. This library supports the PBM (portable bitmap) image format in the ASCII and the binary version.
  • The new library pgm.s7i has been added. This library supports the PGM (portable graymap) image format in the ASCII and the binary version.
  • Support for the ASCII PPM (portable pixmap) image format has been added to the library ppm.s7i. The existing binary PPM function has been refactored.
  • The library imagefile.s7i has been improved to support PBM, PGM and PPM image files in the ASCII and the binary version.
  • The new library pixelimage.s7i has been added. This library defines the type pixelImage (2D array of pixels) and functions to convert (getPixmap() and getPixelImage()), rotate and mirror pixel images. The type pixelImage is a 2D array with a fixed minimum index.
  • The libraries bmp.s7i, ccittfax.s7i, gif.s7i, ico.s7i, jpeg.s7i, png.s7i, ppm.s7i and tiff.s7i have been refactored to use the type pixelImage.
  • Explanations about specifying number formats and what happens during "make depend" have been added to the FAQ.
  • The tutorial about templates in the manual has been improved.
  • An explanation of the interpreter option -te (trace exceptions) has been added to the chapter "errors" of the manual.
  • The new library exif.s7i has been added. This library supports the exchangeable image file format. It also defines the function changeOrientation() which changes an image orientation according to the Exif orientation value.
  • In jpeg.s7i the function readEntropyCodedSegment() has been refactored to use getTerminatedString with '\255;' as terminator. This improves the performance of readEntropyCodedSegment() by a factor of 3. The run-time of the function readJpeg() has been reduced by 4.7% (measured with gcc and valgrind and the s7c options -oc3 -O3).
  • In huffman.s7i array types with fixed minimum index have been introduced (huffmanSymbolArray and msbHuffmanCodeLengthArray). The run-time of the function readJpeg() has been reduced by 2.8% (measured with gcc and valgrind and the s7c options -oc3 -O3).
  • The library ccittfax.s7i has been adjusted to use the types huffmanSymbolArray and msbHuffmanCodeLengthArray and to work without a generic huffmanTable type.
  • A definition of the type colorLookupTable has been added to the library graph.s7i.
  • The libraries bmp.s7i, ccittfax.s7i, gif.s7i, png.s7i and tiff.s7i have been refactored to use the new type colorLookupTable for palette values.
  • The interpreter has been improved to allow the termination of a program with a stack trace. After pressing ctrl-c the menu allows selecting # (+return) to terminate the program with a stack trace.
  • In basearray.s7i a times operator for arrays with a fixed minimum index has been added.
  • In basearray.s7i the default value of arrays with a fixed minimum index has been fixed.
  • Tests for fixed size arrays and arrays with a fixed minimum index have been added to chkarr.sd7.
  • Support for interlaced GIF images has been added to gif.s7i.
  • Support for the ThunderScan 4-bit compression algorithm has been added to the library tiff.s7i.
  • In tiff.s7i the functions tagValueAsString() and tagValueAsArray() have been improved to read up to 4 bytes from valueOrOffset.
  • The library tiff.s7i has been improved to use Exif data to change the orientation of an image if necessary.
  • In jpeg.s7i the function readBlock() has been simplified.
  • The types twoDataBlocksArray, fourDataBlocksArray and fourHuffmanTables have been introduced in jpeg.s7i. These types define fixed size arrays.
  • The types jpegComponentArray and jpegScanArray have been introduced in jpeg.s7i. These types define arrays with a fixed minimum index.
  • Magic numbers for Mach-O, PE, MZ, PBM, PGM, PPM and the shebang have been added to magic.s7i.
  • The function getLetters() has been added to scanfile.s7i and scanstri.s7i.
  • Tests for the function getLetters() have been added to chkscan.sd7.
  • Support for TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 has been added to tls.s7i.
  • The library rpm.s7i has been improved:
    • Support for file sizes >= 4GB has been added.
    • Now a unique inode number is assigned to each new RPM catalog entry.
    • The function rpmDependencyFlagsString() has been improved.
    • Declarations of the flags RPMFILE_NONE, RPMFILE_UNPATCHED, RPMFILE_PUBKEY and RPMFILE_ARTIFACT have been added.
    • The function initLead() has been added.
    • The function readLead() has been improved to read the RPM lead name without trailing zero bytes.
    • The new enumeration type rpmPackageType has been added.
    • The field lead.fileType has been renamed to lead.packageType.
    • The sizes of regular files and sizes of symlinks are summed up and stored in RPMTAG_SIZE respectively RPMTAG_LONGSIZE (when >= 4GB).
    • The sha-256 digest of the uncompressed payload is computed and stored under RPMTAG_PAYLOADDIGESTALT.
    • The new function updateDependencies() has been introduced. It computates RPMTAG_FILEDEPENDSX, RPMTAG_FILEDEPENDSN and RPMTAG_DEPENDSDICT.
    • RPMTAG_FILEDEPENDSX and RPMTAG_FILEDEPENDSN are only written if RPMTAG_DEPENDSDICT exists.
    • Code to read RPMTAG_DEPENDSDICT has been added to doSettings().
    • The dependencies are computed when an ELF file is added to the RPM archive.
    • Operators to compare rpmDependency values (with = and <> ) have been added.
    • The rpmDependency functions compare(), findDependency() and addDependency() have been added.
    • The functions updateProvisions(), updateRequirements(), updateDependencies(), update(), checkUncompressedDigest() and setDependencies() have been added.
    • The functions sectionStri() and updateStore() have been improved to process index entry data ordered by tag number.
    • The catalog entry elements dirIndex and fileClass have been changed to be zero based instead of one based.
    • The function putFile() has been improved to set file color and file class when an existing file is overwritten.
    • The element dirNameList has been renamed to dirNames.
    • The functions makeLink(), putFile(), makeDir(), removeFile() and openFileInRpm() have been changed to call archiveFilePath(). This assures that a relative ./ path is used in the basic CPIO archive.
  • The new library rpmext.s7i has been added. This library contains extensions for the rpm.s7i library. It allows getting and setting additional properties of an RPM archive.
  • The library cpio.s7i has been improved to assign a unique inode number to each new CPIO header. The cpioHeader field ino has been renamed to inode.
  • The function getStriUpToChar() has been removed from bytedata.s7i. The function getTerminatedString() can be used instead.
  • The function terminated_read() has been added to clib_file.s7i.
  • The compiler has been improved:
    • The code generation for array indexing has been fixed to work for a negative minIdx.
    • The array indexing for arrays with a fixed minimum index has been optimized.
    • Creating a two dimensional array with the times operator has been optimized. The run-time of the function readJpeg() has been reduced by 2.1% (measured with gcc and valgrind and the s7c options -oc3 -O3).
    • The times operator for two dimensional arrays with a fixed minimum index has been optimized. The run-time of the function readJpeg() has been reduced by 2.1% (measured with gcc and valgrind and the s7c options -oc3 -O3).
    • A counter for suppressed overflow checks has been added.
    • In arr_act.s7i the function declare_prototype_if_necessary() has been renamed to declare_times_prototype().
    • The functions isFixedMinIdxTimes() and two_dimensional_times_optimization() have been added to arr_act.s7i.
    • In arr_act.s7i subtractions of integer literals have been changed to insert a space after the "-" operator. This avoids writing "--" (which triggers a C compiler error message).
    • The functions define_array_size_variable(), process_arr_free() and process_sct_free() have been added to comp/destr.s7i.
    • The function process_arr_alloc() has been added to comp/create.s7i.
    • Support for fix size array free lists has been added in create.s7i and destr.s7i. This functionality is currently deactivated in config.s7i.
    • The function getParameterInResultStatement has been added to comp/expr_utl.s7i.
  • The function getTerminatedString() has been added to file.s7i, external_file.s7i, null_file.s7i and strifile.s7i.
  • Unnecessary string assignments have been removed from chkfil.s7i.
  • Tests for the function getTerminatedString have been added to chkfil.sd7.
  • Tests in chkfil.sd7 have been improved to check if bufferChar has the correct value after calls of getln() and getwd().
  • Interpreter and compiler have been improved to support the action FIL_TERMINATED_READ.
  • In common.h the boolean fields readingAllowed and writingAllowed have been added to the fileStruct.
  • In the files fil_emc.c, fil_rtl.c, fil_rtl.h, fil_unx.c, fil_win.c, pcs_unx.c, pcs_win.c and traceutl.c initializations of the new fields readingAllowed and writingAllowed have been added.
  • In fil_rtl.c the function get_mode() has been improved to determine readingAllowed and writingAllowed from the opening mode.
  • In fil_rtl.c the parameters of get_mode() have been refactored to get_mode(file_mode, os_mode).
  • In fil_rtl.c and utf_rtl.c the functions filGets, filLineRead, filWordRead, ut8Gets, ut8LineRead and ut8WordRead have been improved to check readingAllowed if the macro FREAD_WRONG_FOR_WRITE_ONLY_FILES is defined. This way, the functions reliably raise FILE_ERROR on an attempt to read from a write-only file.
  • In the functions filWrite() (in fil_rtl.c) and ut8Write() (in utf_rtl.c) checks with system specific flags have been replaced with checks using the boolean value writingAllowed.
  • In fil_rtl.c the call of get_mode() has been moved from cFileOpen() to filOpen().
  • The function filTerminatedRead() has been added to fil_rtl.c.
  • The function fil_terminated_read() has been added to fillib.c.
  • The function free_matched_list() has been added to name.c.
  • The global interpreter flag catch_exceptions has been defined in runerr.h.
  • In prclib.c the functions prc_block(), prc_block_catch_all() and prc_block_otherwise() have been improved to catch an exception only if catch_exceptions is TRUE.
  • In runerr.c the functions continue_question() and uncaught_exception() have been improved to allow that '#' terminates the program with a stack trace. In this case the global interpreter flag catch_exceptions is set to FALSE.
  • In chkccomp.c the test to determine if fclose() fails after a previous error has been improved.
  • The program chkccomp.c has been improved to define reparse point macros and the macro INVALID_FILE_ATTRIBUTES if necessary.
  • Support for the option LINK_TIME has been added to chkcccomp.c and to makefile, mk_clang.mak, mk_freebsd.mk, mk_icc.mak, mk_linux.mak, mk_osx.mak, mk_osxcl.mak and mk_tcc_l.mak.
  • The command "make strip" has been improved in the makefiles to strip Seed7 interpreter, compiler and libraries.
  • A check if memcpy() with zero bytes does nothing has been added to chkccomp.c.
  • The function findLinkerOptionForDll has been added to chkccomp.c. This function is used if LINK_TIME=BUILD.
  • Descriptions of the packages needed for the Linux build have been added to src/readme.txt, src/readme.htm, doc/faq.txt and doc/faq.htm.
  • Documentation comments have been improved in bin32.s7i, bin64.s7i, rpm.s7i, ppm.s7i, imagefile.s7i, ppm.s7i, scanfile.s7i, scanstri.s7i and fil_rtl.c.... read more
Posted by Thomas Mertes 2024-08-12

New Seed7 Release 2024-06-30

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • Explanations about scanner functions and why some write statements raise RANGE_ERROR have been added to the FAQ.
  • The new library json.s7i has been added. This library supports reading processing and writing JSON data. A JSON DOM is used to store the JSON data.
  • A test program for JSON functions (chkjson.sd7) has been added.
  • The program calc7.sd7 has been improved to support JSON functions.
  • The new library magic.s7i has been added. This library supports getting magic numbers (signatures) from strings and files.
  • The new library basearray.s7i has been added. This library supports arrays with a fixed minimum index.
  • Tests for arrays with fixed size or fixed minimum index have been added to chkarr.sd7.
  • A test program for scanner functions (chkscan.sd7) has been added.
  • The Seed7 compiler (s7c.sd7) has been improved:
    • Support to compile dynamic functions with a type result has been added.
    • The compilation of an array sort has been improved to avoid unnecessary copying of the array.
    • The code generation for a fixed size array index access has been refactored.
    • The code generation for dynamic function calls has been refactored.
    • The optimizations for array indexing have been improved.
  • Interpreter and compiler have been improved to raise INDEX_ERROR instead of RANGE_ERROR if indexing into a hash map fails.
  • Tests for INDEX_ERROR have been added to chkhsh.sd7.
  • A function to sort an array in reverse order has been added to the library array.s7i.
  • Tests for array assignment and array sort have been added to chkarr.sd7.
  • The program chk_all.sd7 has has been adjusted to consider the changes in the test suite.
  • In ar.s7i, cpio.s7i, rpm.s7i, tar.s7i, tar_cmds.s7i and zip.s7i the function getFileMode has been improved to return only the permission bits.
  • In tar.s7i and zip.s7i the function setFileMode() has been improved to only change the permission bits.
  • In ar.s7i, cpio.s7i, rpm.s7i, tar.s7i and zip.s7i the function close() has been changed to reset the file system to be empty.
  • In ar.s7i, cpio.s7i, rpm.s7i, tar.s7i and zip.s7i the functions fileType() and fileTypeSL() have been changed to return FILE_UNKNOWN for a unknown file type.
  • The libraries ar.s7i, cpio.s7i, rpm.s7i and tar.s7i have been improved such that newly created files in an archive get an UID and GID of 0.
  • The library ar.s7i has been improved to use only ASCII file names without a slash (/) and a length less than 16. All other file names are stored as long name.
  • The function makeDir() has been added to ar.s7i and zip.s7i.
  • The function makeLink() has been added to filesys.s7i, osfiles.s7i, ar.s7i, cpio.s7i, rpm.s7i, tar.s7i and zip.s7i.
  • Support for the function removeFile() has been added to cpio.s7i, rpm.s7i, tar.s7i and zip.s7i.
  • In ar.s7i the function removeFile() has been improved to remove any file except non-empty directories.
  • Support for the function readLink() has been added to ar.s7i and zip.s7i.
  • In cpio.s7i, rpm.s7i and zip.s7i the function readLink() has been improved to support symlinks with UTF-8.
  • In ar.s7i, cpio.s7i, rpm.s7i, tar.s7i and zip.s7i the function fileType() has been improved to return FILE_SYMLINK if the symbolic link chain is too long.
  • The constant MAX_SYMLINKS has been renamed to MAX_SYMLINK_CHAIN_LENGTH.
  • The functions mkdir(), symlink() and cmd_sh() are deprecated now. The functions makeDir(), makeLink() and shellCmd() should be used instead. The parameters of makeLink() differ from the parameters of symlink(). The symlinkPath is the first parameter of makeLink() and the second parameter of symlink(). The function shellCmd() raises FILE_ERROR if executing the command fails.
  • The files cc_conf.s7i, cli_cmds.s7i, cmd_act.s7i, cpio.s7i, filesys.s7i, ftp.s7i, osfiles.s7i, rpm.s7i, shell.s7i, tar.s7i, chkcmd.sd7, ftp7.sd7, sydir7.sd7, cmdlib.c, cmd_rtl.c and cmd_rtl.h have been changed to use makeDir(), makeLink() and shellCmd() instead of the deprected functions.
  • The function implicitDir() has been added to archive_base.s7i. This allows removing declarations of implicitDir() from ar.s7i, cpio.s7i, rpm.s7i, tar.s7i and zip.s7i.
  • The function isEmptyDir() has been added to archive_base.s7i. This function is used in ar.s7i, cpio.s7i, rpm.s7i, tar.s7i and zip.s7i to assure that removeFile() removes only directories which are empty.
  • The library ar.s7i has been improved to read and store the file mode as octal number.
  • The library rpm.s7i has been improved:
    • Now, it computes dirIndex and baseName when a file is created.
    • Now, it sets the RPM file class when a file is created. This is done with the functions getMagic() and magicDescription() from the library magic.s7i.
    • The function getNameIndex() has been introduced as helper function.
    • User and group names are stored additionally to UIDs and GIDs.
    • Now, the function close() does not write the tag ARCHIVESIZE as it might overflow.
    • Support for the RMP file color (1 for 32bit ELF, 2 for 64bit ELF and 0 otherwise) has been added.
    • Declarations for RPMFILE flags have been added.
  • The library tar.s7i has been improved:
    • Now the end-of-file marker is considered.
    • The exception FILE_ERROR is raised if the check-sum of a header is not okay.
    • The function setGroup(... SYMLINK) has been fixed to set the gid and the gname.
  • The library zip.s7i has been improved:
    • Now it sets the modification time when a file is created.
    • Now, the last access time and the modification time are updated together.
    • The helper functions isRegularFile() and isSymlink() have been added.
    • The crc32 check in getFile() has been simplified.
  • Symbolic link setters for mTime have been added to ar.s7i and zip.s7i.
  • Setters for owner and group of normal files and symbolic links have been added to ar.s7i and zip.s7i.
  • The libraries des.s7i and tdes.s7i have been improved to use fixed size arrays for the encryption sub keys.
  • In scanfile.s7i the function getQuotedText() has been fixed to move past the closing quotation character.
  • The function getWord(), with allowed characters as parameter, has been added to scanstri.s7i and scanfile.s7i.
  • The library tar_cmds.s7i has been improved:
    • The functions tarTell() and tarXtract() have been improved to write an error message if the magic number or the check-sum is not okay.
    • The function tarTell() has been improved to write the file type indicator for all type flag values.
    • The function tarXtract() has been improved to look for existing files with fileTypeSL() instead of fileType().
    • Support for the extraction of symbolic links has been added.
    • The functions tarTell(), tarXtract() and tarCreate() have been improved to consider the end-of-file marker.
  • The function isSetType has been added to bitset.s7i, bitsetof.s7i and hashsetof.s7i.
  • The copyright notice of interpreter and compiler has been updated.
  • Comparisons for the type void have been added to seed7_05.s7i.
  • In syntax.s7i the priority of the shift operators >> and << has been changed from 9 to 6. Now the shift operators have the same priority as multiplication an division.
  • Interpreter and compiler have been improved to support the action ARR_SORT_REVERSE.
  • The functions qsort_array_reverse() and arr_sort_reverse() have been added to arrlib.c.
  • The functions rtl_qsort_array_reverse() and arrSortReverse() have been added to arr_rtl.c.
  • In strlib.c the functions str_toutf8() and str_utf8tostri() have been renamed to str_to_utf8() and str_from_utf8() respectively.
  • In str_rtl.c the function strUtf8ToStri has been renamed to strFromUtf8().
  • The actions CMD_MKDIR, STR_TOUTF8 and STR_UTF8TOSTRI have been renamed to CMD_MAKE_DIR, STR_TO_UTF8 respectively STR_FROM_UTF8.
  • Documentation comments have been improved in array.s7i, ar.s7i, cpio.s7i, filesys.s7i, float.s7i, getf.s7i, hash.s7i, osfiles.s7i, rpm.s7i, scanfile.s7i, shell.s7i, stdio.s7i, string.s7i, tar.s7i, zip.s7i, cmdlib.c, cmd_rtl.c, hshlib.c and hsh_rtl.c.... read more
Posted by Thomas Mertes 2024-06-30

New Seed7 Release 2024-04-29

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • The compilation of s7c with tcc has been fixed. Many thanks to Cheap-Ad9743 for pointing out that compiling s7c with tcc failed.
  • Chapters about hashes and templates have been added to the manual.
  • The library hash.s7i has been improved to support hash table literals and the comparison of hash tables with = and <> .
  • The new library scanjson.s7i has been added. This library supports scanning (reading) JSON (JavaScript Object Notation) symbols from strings and files.
  • The experimental readjson.s7i library has been removed.
  • The new library fixarray.s7i has been added. This library supports arrays with a fixed size. The minimum and maximum index of these arrays is encoded in the type. The functions minIdx(), maxIdx() and length() can be used with an array or the type as parameter. The times operator can be used with: arrayType times elementValue.
  • The library msgdigest.s7i has been refactored to use fixed size arrays. The reduction in run-time for some functions is md5: 6%, sha1: 26%, sha256: 21%, sha512: 22%.
  • The library lzma.s7i has been refactored to use fixed size arrays. The run-time of the XZ decompression has been reduced by 10%.
  • The library jpeg.s7i has been refactored to use the fixed size array type dataBlockType instead of array integer.
  • In jpeg.s7i the restart interval handling (with mcuCount) has been improved.
  • The libraries deflate.s7i and gzip.s7i have been refactored to use a fixed size array for the sliding window.
  • The library aes_gcm.s7i has been refactored to use fixed size arrays for the factor H.
  • The interface types for bitStream and huffmanTable have been removed. This way, bitStream and huffmanTable functions are called without dynamic dispatch. This change reduces the run-time of the function readJpeg() by 5.2% (measured with gcc and valgrind and the s7c options -oc3 -O3).
  • The templates DECLARE_CcittModifiedGroup3Fax_FUNCTIONS, DECLARE_CcittT6Fax_FUNCTIONS and DECLARE_CcittT4Fax2d_FUNCTIONS have been added to ccittfax.s7i. The templates are instantiated for MSB and LSB bit ordering. This way ccittfax functions work without dynamic dispatch.
  • A declaration of the template DECLARE_MIN_MAX has been added to integer.s7i. This template is used to define the functions min() and max() for the types bigInteger, bigRational, float, integer and rational (in bigint.s7i, bigrat.s7i, float.s7i, integer.s7i and rational.s7i respectively).
  • Now non-SYMLINK getters and setters in cpio.s7i, tar.s7i and rpm.s7i follow relative symlinks inside the archive.
  • Getters for fileMode, mTime, owner and group of symbolic links have been added to cpio.s7i, tar.s7i and rpm.s7i.
  • Setters for mTime, owner and group of symbolic links have been added to cpio.s7i, tar.s7i and rpm.s7i.
  • In osfiles.s7i SYMLINK setters for mTime, owner and group have been added for the type osFileSys.
  • Setter interface functions for mTime, owner and group of symbolic links have been added to filesys.s7i.
  • The functions removeDotFiles and symlinkDestination have been added to filesys.s7i.
  • In encoding.s7i the functions toBase and toBase58 have been fixed to allow encoding "". The functions toBase and fromBase have been improved to work with any digit for 0 (toBase58 encodes 0 with 1).
  • In scanfile.s7i the function getLineComment has been fixed to leave line endings unchanged.
  • In scanstri.s7i the function getEscapeSequence has been fixed to assume that numeric escape sequences end with a semicolon (;). The function getNumber has been refactored as well.
  • A definition of HASHELEMOBJECT has been added to category.s7i.
  • The function conv2unicode in the charsets.s7i library has been improved to use a for-each loop.
  • A declaration of the function arrayLength has been added to the progs.s7i library. This function is used by the compiler.
  • The Seed7 compiler (s7c.sd7) has been improved:
    • The maximum and minimum values in a constant integer array are determined. This way the range of possible values for indexing into this array can be estimated. This allows for the removal of some overflow checks. The run-time of the function md5() has been reduced by 2.6% (measured with gcc and valgrind and the s7c options -oc3 -O3).
    • Now assignments with the times operator like dest := aSize times 0 are optimized to use memset().
    • Assignments to an integer array where the source array contains only zeros are optimized to use memset(). The assignment does realloc the array if the size changes. For fixed size arrays the check of the size and the call of realloc is optimized away.
    • For fixed size arrays index checks are optimized away if the range of possible index values is always inside the array. This optimization reduces the run-time of the function readJpeg() by 7.5% (measured with gcc and valgrind and the s7c options -oc3 -O3).
    • Fixed size array assignments have been improved to omit the copy of minIdx and maxIdx (for fixed size arrays they cannot change with an assignment).
    • The index check for fixed size arrays has been simplified. For these arrays the lower and upper bounds of the index are known at compile time. This optimization reduces the run-time of the function readJpeg() by 7.9% (measured with gcc and valgrind and the s7c options -oc3 -O3).
    • Indexing into an array has been improved for fixed size arrays if the index checks are suppressed.
    • In str_act.s7i the index check for the fixLen substring operation (stri[start fixLen length]) has been simplified.
    • Now the division of product with mdiv is optimized. The division or the multiplication is removed if possible.
    • The recognition of constant expressions has been improved. Constants defined with a parameter list are not considered constant if at least one parameter is not constant.
    • The code generation in set_act.s7i has been improved to avoid adjacent - operators (e.g. number--1).
    • Now a generic function for user defined hashCode function is generated.
    • In int_act.s7i the statistic of suppressed range checks has been improved.
  • Regression tests which create adjacent - operators in the generated C code have been added to chkset.sd7.
  • In drw_x11.c the graphics driver has been improved to support window titles with Unicode.
  • In chkccomp.c test programs have been improved to call XRenderQueryExtension() only if XOpenDisplay("") succeeded.
  • In bitdata.s7i the deprecated functions getBitLsb(), getBitsLsb(), peekBitsLsb(), skipBitsLsb(), getBitMsb(), getBitsMsb(), peekBitsMsb() and skipBitsMsb() with a string as parameter have been removed. The functions with the types lsbBitStream and msbBitStream should be used instead.
  • Tests for the deprecated bitdata functions with a string as parameter (getBitLsb, getBitsLsb, peekBitsLsb, getBitMsb, getBitsMsb and peekBitsMsb) have been removed from chkbitdata.sd7.
  • In huffman.s7i the deprecated functions getHuffmanSymbolMsb(string, ...) and getHuffmanSymbolLsb(string, ...) have been removed. The functions getHuffmanSymbol(msbBitStream, ...) and getHuffmanSymbol(lsbBitStream, ...) should be used instead.
  • In strifile.s7i the deprecated function openStrifile() has been removed. The function openStriFile() should be used instead.
  • In stritext.s7i the deprecated function openStritext() has been removed. The function openStriText() should be used instead.
  • The syntax of hash literals and fixed size arrays has been added to syntax.s7i.
  • Generic hashCode functions have been introduced in big_gmp.c, big_rtl.c, bst_rtl.c, int_rtl.c, pcs_rtl.c, set_rtl.c and str_rtl.c. Function prototypes of these functions are defined in big_act.s7i, bst_act.s7i, pcs_act.s7i, set_act.s7i and str_act.s7i. Function pointers to these functions are used by s7c.sd7 in the function action_address.
  • The functions hsh_concat_key_value, hsh_gen_hash and hsh_gen_key_value have been added to hshlib.c.
  • The functions hshConcatKeyValue, hshGenHash and hshGenKeyValue have been added to hsh_rtl.c.
  • The function bld_hashelem_temp has been added to objutl.c.
  • Interpreter and compiler have been improved to support the actions HSH_CONCAT_KEY_VALUE, HSH_GEN_HASH and HSH_GEN_KEY_VALUE.
  • Logging functions have been improved in drw_win.c, drw_x11.c, hshlib.c and sctlib.c.
  • Documentation comments have been improved in array.s7i, bin32.s7i, bin64.s7i, cpio.s7i, hash.s7i, rpm.s7i, tar.s7i and int_rtl.c.... read more
Posted by Thomas Mertes 2024-04-29

New Seed7 Release 2024-03-22

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • The compiler has been fixed to be able to compile itself without using the X11 library. Many thanks to Pietro Cerutti for pointing out that compiling s7c.sd7 under FreeBSD failed. Now the function colorPixel() is only used if there is at least one non-empty window object.
  • In drw_x11.c the function drwRgbColor() has been improved to raise GRAPHIC_ERROR if it is called without a successful drawInit(). Many thanks to Zachary Menzies for pointing out that the compilation of the Seed7 compiler on AlmaLinux 9 triggered a segmentation fault.
  • In tim_win.c the function timAwait has been improved to always raise RANGE_ERROR on february 29th of a non-leap-year. Many thanks to Joe Thompson for pointing out that the chktime.sd7 test failed with MinGW (gcc 8.1). The program chkccomp.c has been improved to define the macro CHECK_NON_LEAP_YEAR_FEBRURARY_29 in version.h if SystemTimeToFileTime() allows february 29th of a non-leap-year.
  • The file readjson.s7i with experimental functions to read JSON files has been added. Thanks to Bruce Axtens for driving the attention towards reading JSON.
  • The program make7 hase been improved to support commands enclosed in backticks. The change has been made in cli_cmds.s7i.
  • The Seed7 compiler (s7c.sd7) has been improved:
  • A heap corruption is avoided if the RHS (right hand side) of an assignment changes the target variable. E.g.: aVariable := changeParameter(aVariable); This has been fixed for the types string, bstring, bigInteger, bitset, array, clib_file, struct, window, pointList, sqlStatement, interface, ref_list, process, program, and database.
  • The generated code to handle assignments has been improved in arr_act.s7i, big_act.s7i, bst_act.s7i, drw_act.s7i, fil_act.s7i, itf_act.s7i, pcs_act.s7i, pol_act.s7i, prg_act.s7i, rfl_act.s7i, sct_act.s7i, set_act.s7i, sql_act.s7i and str_act.s7i.
  • In inline.s7i the function process_inline_func() has been fixed to define the result name. Now the inlining of a result expression works correctly. A test for this has been added to chkhsh.sd7 (function chkInlineHashKeys).
  • Now the initialization of window constants assumes an identical pixel encoding if the pixel masks are zero.
  • The initialization of POLLOBJECT, REFLISTOBJECT, PROGOBJECT, DATABASEOBJECT, SQLSTMTOBJECT objects has been improved.
  • An explanation about the use of special actions for inlining has been added to lib/comp/const.s7i.
  • Tests for an assignment where the RHS (right hand side) changes the variable have been added to chkarr.sd7, chkbig.sd7, chkbst.sd7, chkdb.sd7, chkfil.sd7, chkflt.sd7, chkint.sd7, chkset.sd7 and chkstr.sd7. The program chk_all.sd7 has been adjusted for these tests.
  • The graphic driver for the browser in drw_emc.c and gkb_emc.c has been improved:
  • The handling of the close button of a browser window (X) has been improved. In case the browser decides to delete the window immediately (without asking) the contents of the old window is copied to a new window at the same location and KEY_CLOSE is submitted to the program.
  • In gkb_emc.c the variable closePopupStateList and the functions getClosePopupState(), setClosePopupState(), isClosePopupActive() and leavePageWasPressed() have been added. The functions maintain the state after the close button (X) has been clicked (the closePopupState).
  • Documentation about the closePopupState has been added to gkb_emc.c.
  • The function decodeFocusEvent() has been added to gkb_emc.c.
  • Now drwOpen and copyWindow search for the presence of the JavaScript function registerWindow. If it is present, it is invoked with the new window as parameter. The HTML page can define registerWindow to maintain open windows. This way, the HTML page can delete open windows.
  • Now a local substitute window is opened if the browser does not allow a new window (popup). This is done in the function openSubstituteWindow().
  • The elements is_substitute and parentWindow have been added to the emc_winRecord struct.
  • The functions windowExists, copyWindow, clickedWindowLeftPos and clickedWindowTopPos have been added to drw_emc.c.
  • The functions clickedXPos and clickedYPos have been improved to work correctly in the browser.
  • Freeing a window object in drwFree() now sets the entries in mapIdToWindow, mapIdToCanvas and mapIdToContext to undefined (before, they were set to null).
  • In pre_js.js the strategy to determine the program name when a program runs in the browser has been improved.
  • In keybd.s7i the deprecated functions getxpos() and getypos() have been removed. The function clickedXPos() and clickedYPos() should be used instead.
  • In unicode.s7i the deprecated functions striToUtf16be(), striToUtf16le(), utf16beToStri(), utf16leToStri() and utf7ToStri() have been removed. The functions toUtf16Be(), toUtf16Le(), fromUtf16Be(), fromUtf16Le() and fromUtf7() should be used instead.
  • The actions GKB_BUTTON_XPOS and GKB_BUTTON_YPOS have been renamed to GKB_CLICKED_XPOS respectively GKB_CLICKED_YPOS. Changes have been made in keybd.s7i, comp/action.s7i, comp/gkb_act.s7i, primitiv.c, drwlib.h, drwlib.c, drw_drv.h, drw_dos.c, emc_utl.h, emc_utl.c, gkb_emc.c, gkb_win.c and gkb_x11.c.
  • In kbd_inf.c and kbd_poll.c the functions kbdGetc() and kbdInputReady() have been improved to call fflush(stdout).
  • The X11 function forwarding has been improved to allow direct use of function pointers. Function forwarding is only used if the X11 libraries were missing at build time. The direct use of function pointers can be activated by defining the macro FORWARD_X11_FUNCTION_POINTERS. In this case, logging of X11 functions (that intermediate functions can do) is not possible. These changes introduce the file fwd_x11.h.
  • In gkb_emc.c, gkb_win.c and gkb_x11.c the function remove_window() has been improved to call hshExcl only if the window_hash is not NULL.
  • In drw_emc.c, drw_win.c and drw_x11.c the function getCloseAction() has been improved to check that actual_window is not NULL.
  • In drw_win.c the function drwPut() has been improved to check for RANGE_ERROR at one place.
  • Now the empty window is always a singleton. The function generateEmptyWindow() has been introduced in drw_x11.c and drw_emc.c. In drawInit() the singelton is generated with a call of generateEmptyWindow().
  • The management of the usage counter (usage_count) for windows, databases and sqlStatements has been improved. Now they are permanent if the usage_count is 0. A usage_count of 0 will neither increase nor decrease. Currently only the empty window is permanent. The changes took place in gkb_emc.c, gkb_win.c, gkb_x11.c, ref_data.c, sql_cli.c, sql_oci.c, sql_post.c and sql_rtl.c.
  • The function determineTimeFunctionProperties() has been added to chkccomp.c. This function checks if SystemTimeToFileTime() accepts 2001-02-29 (which does not exist).
  • The program chkccomp.c has been changed to always call defineX11rgbToPixelMacro() if X11 is used. This function determines the X11 pixel masks.
  • Now the program chkccomp.c defines in version.h that GLX uses an absolute point list with an int size of 16-bits.
  • The makefile mk_emccl.mak has been improved to call node.js with which node. Some make utilities trigger a "Permission denied" error if node is called directly.
  • The logging in graphic drivers has been improved. Changes have been made in drw_emc.c, drw_rtl.c, drw_win.c, drw_x11.c, drwlib.c, gkb_emc.c, gkb_win.c and gkb_x11.c.
  • Logging functions have been added in arr_rtl.c, drwlib.c, drw_rtl.c, drw_emc.c, drw_win.c, drw_x11.c, gkb_emc.c, gkb_win.c, gkb_x11.c, pol_unx.c, ref_data.c and sql_rtl.c.... read more
Posted by Thomas Mertes 2024-03-22

New Seed7 Release 2024-03-01

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • Many thanks to Neal Collins for correcting the handling of double quotes in toCsvLine and for fixing /./../ sequences in toAbsPath.
  • Many thanks to Jules Amonith for fixing a typo (Respose was used instead of response).
  • Many thanks to Federico Ercole for helping with JavaScript issues. Now clicks on the close button of a browser window can be processed in the program (as KEY_CLOSE). Starting programs from HTML has been improved as well. A terminating program now calls the JavaScript function reloadPage (defined in the HTML document).
  • The parser has been improved to stop parsing if the include of an essential file (seed7_05.s7i) fails. Many thanks to Dominik Dorn for reporting that a misspelled seed7_05.s7i triggered many errors.
  • The build of Seed7 has been fixed to work if CreateSymbolicLinkW() is missing. Many thanks to Cheap-Ad9743 for pointing out that the build with tcc under Windows failed.
  • The chapters about declarations, parameters, operating system access and graphics in the manual have been improved.
  • In mahjong.sd7 the drawing of mahjong tiles has been improved. Now the tiles are correctly displayed in the browser as well.
  • In lander.sd7 the drawing of the rocket has been improved. Now the rocket is correctly displayed in the browser as well.
  • In osfiles.s7i the function cloneFile has been improved to copy symbolic links under Windows. FILE_ERROR is raised if cloneFile cannot create a symbolic link.
  • The functions bitLength and lowestSetBit have been added to bin32.s7i and bin64.s7i. Tests for bitLength and lowestSetBit have been added to chkbin.sd7.
  • The libraries pic_util.s7i, tiff.s7i and png.s7i have been improved to use mdiv instead of div if the divisor is a power of two.
  • Functions for the type pointList have been refactored in graph.s7i and progs.s7i. Before pointList used bstring (BST_...) actions. Now pointList uses PTL_... actions.
  • Conversion functions to convert between pointList and bstring have been added to graph.s7i.
  • Definitions of PIXEL_ALPHA_MASK, POINT_LIST_INT_SIZE, POINT_LIST_ABSOLUTE and USE_START_MAIN have been added to cc_conf.s7i. The file cmd_rtl.c and the program confval.sd7 have been adjusted accordingly.
  • In chkstr.sd7 the checking of stri := aString[start .. stop] has been refactored.
  • The tests of file manipulating functions in chkcmd.sd7 have been refactored.
  • Tests in chkbig.sd7, chkbin.sd7, chkchr.sd7, chkflt.sd7, chkidx.sd7, chkint.sd7, chkset.sd7, chkstr.sd7 and chktime.sd7 have been refactored to reduce the size of the functions.
  • Tests have been added to chkbig.sd7, chkbin.sd7, chkchr.sd7, chkcmd.sd7, chkdb.sd7, chkflt.sd7, chkidx.sd7, chkint.sd7, chkset.sd7 and chkstr.sd7 to improve the code coverage of the compiler.
  • Several improvements have been made for Emscripten (running Seed7 programs in the browser):
    • In drw_emc.c the function drwText() has been improved to draw text with the specified background color.
    • In drw_emc.c the functions drwPArc(), drwPFArc(), drwPFArcChord() and drwPFArcPieSlice have been fixed to correctly draw arcs in the browser if the sweep angle is negative.
    • In drw_emc.c the function drwPut() has been improved to do nothing if the source is an empty pixmap.
    • In drw_emc.c the function drwFree() has been improved to remove the canvas of a sub-window.
    • The function getCloseAction has been added to drw_emc.c.
    • In fil_emc.c the call of setOsProperties has been fixed.
    • The file gkb_emc.c has been improved to allow reading KEY_CLOSE in the browser.
    • The event handling in gkb_emc.c has been improved. Now the events visibilitychange and unload are used for program termination. Upon program termination the JavaScript function reloadPage (defined in the HTML document) is called.
    • The functions decodeBeforeunloadEvent, decodeVisibilitychange and decodeUnloadEvent have been added to gkb_emc.c.
    • The functions startMainButtonPresent, addEventPromiseForStartButton, setupEventPromises, freeEventPromises, asyncButtonClick and executeStartMainOnButtonClick have been added to emc_utl.c
  • The Seed7 compiler (s7c.sd7) has been improved:
    • Now unsupported options trigger an error.
    • Now empty temporary files (tmp_*.c) are overwritten.
    • An optimization for bin32(a+b) & constBin32 has been added. The generated code works without overflow checks. Tests for this case have been added to chkbin.sd7.
    • An optimization for bin32(a+b) & constBin32 with bigInteger a and b has been added. The generated code works with integers and without overflow checks.
    • The optimization for ord(aBigInteger mod number1) + number2 has been improved.
    • An optimization for aString[length(aString)] has been added.
    • An optimization that recognizes if aString[start .. stop] always raises an INDEX_ERROR has been added.
    • The code generation for aString[start .. stop] has been improved.
    • An optimization for aString @:= [length(aString)] aChar; has been added
    • The code generated for aString @:= [pos] aChar; has been improved.
    • The optimization of aString &:= str(charExpression); has been improved.
    • An optimization for the string multiplication str(aChar) mult aConstantInteger has been added.
    • An optimization for the division of a product has been added.
    • The code generation of card(bitset(anInteger)) has been refactored. Tests for this case have been added to chkset.sd7.
    • The conversion from a bin32 to a single-precision floating-point number has been optimized. Tests for this case have been added to chkbin.sd7.
    • Image constants are now stored in the target pixel encoding. The compiler will convert the pixels of an image if necessary. The target pixel encoding is specified with the configuration values RED_MASK, GREEN_MASK, BLUE_MASK and ALPHA_MASK.
    • The actions PLT_BSTRING, PLT_CMP, PLT_EQ, PLT_HASHCODE, PLT_NE, PLT_POINT_LIST and PLT_VALUE are listed as pure functions.
    • The code generation for the actions STR_ELEMCPY, SQL_CPY_DB and SQL_CPY_STMT has been refactored.
    • The configuration value USE_START_MAIN is used to produce code for the browser. In this case, main() will check if a startMain button exists in the HTML page. If no startMain button exists, the program will start. If a startMain button exists, the program will wait until it is pressed. After the button is pressed, the function startMain() will be invoked (which executes the rest of the program).
    • The pointList data is now stored in the target encoding. The compiler will convert a pointList if necessary. The target encoding is specified with the configuration values POINT_LIST_INT_SIZE and POINT_LIST_ABSOLUTE.
    • The pointList coordinates are now aligned for Emscripten HEAP32 access. If the macro POINT_LIST_ALIGNMENT is defined, an alignment is necessary. In this case, the function pltAlign() will carry out the alignment. If POINT_LIST_ALIGNMENT is not defined, pltAlign() will just forward its parameter.
    • In type.s7i POINTLISTOBJECT and REFLISTOBJECT have been added to the heapCategories set.
    • Unused code has been removed from flt_act.s7i and str_act.s7i.
    • The functions optimize_big_mod_dividend, process_const_bin_and, optimize_div_of_product, pointListLiteral, process_str_push, process_str_elemcpy_last_char, process_str_idx_last_char, process_plist_declaration, pixelEncodingIdentical, pixelEncodingWithoutAlphaChannel, swapRedAndBlue, fixPixels, pointListEncodingIdentical, toPointListAbsolute, toPointListRelative16, toPointListRelative32, toTargetPointListBstring, init_plist_constants and assign_plist_constants have been added.
  • The functions createSymlink and winCopySymlink have been added to cmd_win.c. Tests for symlinks have been added to chkcmd.sd7.
  • The functions set_excl (in setlib.c) and setExcl (in set_rtl.c) have been improved to resize the set. Tests for excl(bitset, integer) have been added to chkset.sd7.
  • In set_rtl.c and setlib.c the heap statistic has been fixed for several operations.
  • The logging infrastructure has been improved. Now the macros LOG_FUNCTIONS and VERBOSE_EXCEPTIONS can be set to -1. With -1 logging is deactivated even if LOG_FUNCTIONS_EVERYWHERE respectively VERBOSE_EXCEPTIONS_EVERYWHERE is active. Support to activate the function logMessage in every file with LOG_MESSAGES_EVERYWHERE has been added as well.
  • An explanation of the logging infrastructure has been added to common.h.
  • Interpreter and compiler have been improved to support the actions BIN_BIT_LENGTH, BIN_LOWEST_SET_BIT, DRW_GET_PIXEL_DATA_FROM_ARRAY, PLT_BSTRING, PLT_CMP, PLT_CPY, PLT_EQ, PLT_HASHCODE, PLT_NE, PLT_POINT_LIST and PLT_VALUE.
  • The unused action LST_ELEM has been removed form interpreter and compiler.
  • Support for the category POINTLISTOBJECT has been added to interpreter and compiler.
  • The functions drwGetPixelDataFromArray and pltAlign have been added to drw_rtl.c.
  • In gkb_win.c the function gkbInputReady() has been improved to work correctly if GetMessageW() does not return the message promised by PeekMessageW(). Now it is generally assured that only fields of the correct message are accessed.
  • In drw_x11.c the function drwConvPointList has been fixed to work for an empty pointList.
  • In drw_dos.c, drw_emc.c, drw_win.c, drw_x11.c and drw_drv.h the function drwImage has been improved to consider an alpha channel.
  • In cmd_rtl.c the function doReadLink has been refactored to distinguish between link_size (from link_stat.st_size) and dest_buffer_size. This simplifies the check for a truncation.
  • Instances of the words minimal and maximal have been replaced with minimum and maximum in several files.
  • The Seed7 build system has been improved:
    • The build with emcc under Linux and Windows has been fixed. The makefiles mk_emccl.mak and mk_emccw.mak and the program chkccomp.c have been adjusted. Now a stack-size is specified for 'make utils'.
    • Now chkccomp.c uses a better way to determine group and user functions.
    • Now size and signedness of gid_t and uid_t are determined in chkccomp.c. The macros GID_T_SIZE, GID_T_SIGNED, UID_T_SIZE and UID_T_SIGNED are defined accordingly.
    • In chkccomp.c global variables for sizeof_int, sizeof_long, sizeof_long_long, sizeof_pointer, sizeof_float and sizeof_double have been introduced.
    • In chkccomp.c the function testOutputToBuffer() has been improved to work correctly if the first character read is a newline. A check for the buffer size has been added to testOutputToBuffer() as well.
    • Now chkccomp.c determines if the function symlink() is present and sets the macro HAS_SYMLINK accordingly.
    • Performance measurements for left shift have been added to chkccomp.c. The macros LSHIFT_BUILTIN_MUL_TIME, LSHIFT_TWO_ARG_CHECKS_TIME, LSHIFT_ONE_ARG_CHECK_TIME, LSHIFT_RESULT_CHECK_TIME and LSHIFT_NO_CHECK_TIME are defined accordingly.
    • In chkccomp.c check if ferror() returns true after reading from write only file (FERROR_WRONG_WHEN_READING_FROM_WRITE_ONLY_FILE).
    • The number of C compiler warnings in chkccomp.c has been reduced.
    • The functions checkOverflowSignal, timeLShiftOverflowCheck, determineGrpAndPwFunctions and determineCurrentWorkingDirectory have been added to chkccomp.c.
    • The program chkccomp.c has been improved to define the macros GID_T_SIZE, GID_T_SIGNED, UID_T_SIZE, UID_T_SIGNED, GROUP_0_NAME, USER_0_NAME, FERROR_WRONG_WHEN_READING_FROM_WRITE_ONLY_FILE, HAS_SYMLINK, POINT_LIST_INT_SIZE, POINT_LIST_ABSOLUTE, POINT_LIST_ALIGNMENT, LSHIFT_BUILTIN_MUL_TIME, LSHIFT_TWO_ARG_CHECKS_TIME, LSHIFT_ONE_ARG_CHECK_TIME, LSHIFT_RESULT_CHECK_TIME and LSHIFT_NO_CHECK_TIME.
  • In several files flag macros for logging have been introduced:
    • In pol_sel.c and pol_unx.c the flag macro DUMP_POLL has been introduced. This macro decides if detailed information about pollData should be written.
    • In soc_rtl.c the flag macro SHOW_ADDRINFO has been introduced. This macro decides if detailed information about the address info should be written.
    • In sql_oci.c and sql_post.c the flag macro SHOW_DETAILS has been introduced. This macro decides if detailed information should be written.
    • In sql_oci.c the flag macro DEBUG_LONG_CALLBACK has been introduced. This macro decides if detailed information about a long callback should be written.
  • Logging functions have been added or improved in cmdlib.c, cmd_rtl.c, cmd_unx.c, cmd_win.c, con_inf.c, con_win.c, drw_emc.c, drw_win.c, drw_x11.c, gkb_x11.c, pol_sel.c, pol_unx.c, scanner.c, set_rtl.c, sql_cli.c, sql_fire.c, sql_lite.c, sql_my.c, sql_oci.c, sql_post.c, sql_rtl.c, sql_tds.c, str_rtl.c and timlib.c.
  • Deactivated code has been removed from big_rtl.c, blockutl.c, cmd_rtl.c, con_cap.c, con_inf.c, con_win.c, gkb_x11.c, hshlib.c, itflib.c, lstlib.c, name.c, parser.c, pol_sel.c, pol_unx.c, prclib.c, reflib.c, scanner.c, sctlib.c, setlib.c, set_rtl.c, sql_fire.c, sql_odbc.c, striutl.c, strlib.c, str_rtl.c, tim_win.c, typlib.c and ut8_rtl.c.
  • Documentation comments have been improved in array.s7i, bigint.s7i, bin32.s7i, bin64.s7i, bitsetof.s7i, bitset.s7i, csv.s7i, enable_io.s7i, font.s7i, http_response.s7i, idxarray.s7i, integer.s7i, osfiles.s7i, vectorfont.s7i, big_gmp.c, big_rtl.c, biglib.c, binlig.c, intlib.c and int_rtl.c.... read more
Posted by Thomas Mertes 2024-03-01

New Seed7 Release 2023-12-17

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • The FAQ has been improved. Many thanks to Liam O'Brien for creating a list suggested changes. Thanks for helping to improve Seed7 in general.
  • Support for symbolic links under Windows has been added:
    • Symbolic link reparse points and mount reparse points are both treated as symbolic links.
    • The interface does not distinguish between directory symbolic links and normal symbolic links. A normal symbolic link may refer to a directory and readDir(symlink) reads the directory contents (like it does under Linux/Unix/BSD).
    • The functions fileType() and fileTypeSL() have been improved to
      work under Windows like they do under Linux/Unix/BSD:
      • fileType() follows symbolic links and returns the file type of the final destination.
      • fileTypeSL() returns FILE_SYMLINK for symbolic links. For all other file types fileTypeSL() works like fileType().
      • fileTypeSL() does return FILE_SYMLINK only if readLink() works correctly.
      • fileTypeSL() has been fixed to return FILE_DIR for the emulated root directory and FILE_ABSENT if the file path cannot be mapped to a system path.
    • The functions readLink(path) and readLink(path, ABSOLUTE) have been improved to read the symbolic links of Windows. The function readLink(path) can read relative and absolute symbolic links. Both functions can read dangling symlinks. The functions are implemented with DeviceIoControl(). If DeviceIoControl() is not available (HAS_DEVICE_IO_CONTROL is not defined), they raise FILE_ERROR.
    • The functions getFileMode(path), setFileMode(path), getOwner(path), setOwner(path), getGroup(path), setGroup(path) and readDir(path) have been improved to follow symlinks under Windows (like they do under Linux/Unix/BSD).
    • Owner and group of the emulated root directory is "root".
    • The function moveFile() has been improved to avoid following symlinks under Windows (like it does under Linux/Unix/BSD).
    • The function symlink() has been improved to allow the creation of relative and absolute symbolic links under Windows. Under Windows administrator rights or the developer mode are necessary to create symbolic links.
  • Several file functions have been improved:
    • The function getCTime(path) has been improved to return the change time instead of the creation time in Windows (like it does in Linux/Unix/BSD).
    • The file owner and group functions have been improved to avoid localized user and group names under Windows.
    • The function finalPath(path), which follows a symbolic link chain, has been added to the osfiles.s7i library.
    • The functions getFileMode(path, SYMLINK), getATime(path, SYMLINK), getMTime(path, SYMLINK), setMTime(path, time, SYMLINK), getOwner(path, SYMLINK), setOwner(path, owner, SYMLINK), getGroup(path, SYMLINK) and setGroup(path, group, SYMLINK) have been added to the osfiles.s7i library. These functions work only for symbolic links and get or set symbolic link data. They raise FILE_ERROR if 'path' does not refer to a symbolic link.
    • The functions getFileMode(fileSys, path, SYMLINK), getMTime(fileSys, path, SYMLINK), getOwner(fileSys, path, SYMLINK) and getGroup(fileSys, path, SYMLINK) have been added to the filesys.s7i library.
    • The functions copyFile(), cloneFile() and moveFile() have been improved to prohibit that a dangling symlink is overwritten.
    • In osfiles.s7i and filesys.s7i the function fileMode(path) is deprecated now. The function getFileMode(path) should be used instead.
    • The files ar.s7i, cpio.s7i, ftpserv.s7i, process.s7i, rpm.s7i, tar_cmds.s7i, tar.s7i and zip.s7i have been altered to use getFileMode(path) instead of the deprecated fileMode(path).
  • The Seed7 build system has been improved:
    • The makefiles mk_msys.mak, mk_nmake.mak, mk_mingw.mak and mk_mingc.mak have been improved to support 32-bit and 64-bit C compilers.
    • Now, definitions of the library names LIBINTL_DLL, LIBEAY32_DLL, LIBCRYPTO_DLL and LIBSSL_DLL are written to version.h only under Windows.
    • The build tries to load dynamic/shared libraries and logs if they are present or not.
    • For dynamic/shared libraries with an absolute path the build logs, if they are 32-bit or 64-bit.
    • The functionality of setpaths.c has been moved to chkccomp.c.
    • The file setpaths.c has been removed.
    • The files makefile, mk_bcc32.mak, mk_bccv5.mak, mk_clang.mak, mk_clangw.mak, mk_cygw.mak, mk_djgp2.mak, mk_djgpp.mak, mk_emccl.mak, mk_emccw.mak, mk_freebsd.mk, mk_icc.mak, mk_linux.mak, mk_mingc.mak, mk_mingw.mak, mk_msvc.mak, mk_msys.mak, mk_nmake.mak, mk_osxcl.mak, mk_osx.mak, mk_tcc_l.mak and mk_tcc_w.mak have been changed to work without setpaths.c and to call chkccomp with the parameters of setpaths (S7_LIB_DIR, SEED7_LIBRARY and CC_ENVIRONMENT_INI).
    • The search for the SQLite include file in chkccomp.c has been improved to continue if the include file is not in C:/sqlite.
    • The directory seed7/bin has been added as possible place of the sqlite3.dll (or .so).
    • Tests for the presence of the functions CreateSymbolicLinkW(), GetFinalPathNameByHandleW(), DeviceIoControl(), GetFileInformationByHandleEx() and lutimes() have been added to chkccomp.c.
    • In chkccomp.c global variables for buildDirectory, s7LibDir and seed7Library have been introduced.
    • The functions testOutputToBuffer(), determineCurrentWorkingDirectory(), mapCodePageToUtf8(), mapToUtf8(), canLoadDynamicLibrary(), pointerSizeOfDynamicLibrary(), getCodePage(), setS7LibDir(), setSeed7Library() and setPaths() have been added to chkccomp.c.
  • The Seed7 compiler (s7c.sd7) has been improved:
    • Now, it writes warnings if parameter aliasing can happen. A function triggers parameter aliasing if two reference parameters refer to the same value and one of them is changed in the function. In this case the other reference parameter changes as well. The Seed7 compiler checks if a function call uses the same actual parameter twice and at least one of the parameters is modified in the function.
    • Now, it writes the line that triggers a compilation error.
    • The error messages for case statements have been improved.
    • The string index access optimizations have been improved.
    • The estimation of possible string length results has been improved.
    • Now, the range of possible integer results of BIN_AND is computed.
  • Tests for integer +:=, -:= and *:= with itself have been added to chkint.sd7 and chkovf.sd7.
  • Tests for bigInteger *:= with itself have been added to chkbig.sd7.
  • The function open() has been improved such that opening a non-existing absolute path under Windows (a path that cannot be mapped to a system path) returns STD_NULL.
  • In aes_gcm.s7i the run-time of gcmMult has been reduced by 7% (measured with gcc and valgrind).
  • The function inputReady(socket) has been added to the socket.s7i library.
  • The library ftpserv.s7i has been improved to use the function getFileMode(fileSys, path, SYMLINK).
  • In bas7.sd7 an error, found by parameter aliasing checks, has been fixed.
  • The program err.sd7, which triggers most parsing errors, has been updated.
  • In sql_lite.c an initialization of the SQLite connection has been added. This way the connection can be safely checked if sqlite3_open() fails.
  • The file stat_drv.h has been improved to redefine all S_IS... macros if S_IFLNK is not defined.
  • In striutl.c the function stri_to_standard_path() has been improved to avoid a use after free if realloc changes the pointer.
  • In soc_rtl.c the function socInetAddr() has been improved to check if the host name is the name of the local host.
  • Logging functions have been added or improved in cmd_rtl.c, kbd_inf.c, kbdlib.c, sql_lite.c, stat_win.c and striutl.c.
  • In cmd_win.c logging has been changed to log the return code of security functions.
  • Documentation comments have been added or improved in filesys.s7i, osfiles.s7i, cmdlib.c, cmd_rtl.c, cmd_unx.c and cmd_win.c.
  • Macro arguments have been enclosed with parentheses in big_rtl.c, cmd_rtl.c, drw_emc.c, drw_win.c drw_x11.c, int_rtl.c, levelup.c, numutl.c pcs_unx.c, pol_unx.c, str_rtl.c, strlib.c and tracutul.c.
  • In stat_win.c calls of os_stat_orig() have been replaced with calls of FindFirstFileW().
  • The functions wstati64FollowSymlink(), wstatChangeTime(), lstati64Ext() and wchmodExt() have been added to stat_win.c. The function correctAdjustedUnixTime() has been removed from stat_win.c (it was necessary to correct the times of os_stat_orig() that is not used anymore).
  • The functions winRename(), wSymlink(), winSymlink(), getSymlinkDestination(), winReadLink(), followSymlinkRecursive(), winFollowSymlink(), setupWellKnownSids(), cmdGetGroupOfSymlink(), cmdGetOwnerOfSymlink(), cmdSetGroupOfSymlink(), cmdSetMTimeOfSymlink() and cmdSetOwnerOfSymlink() have been added to cmd_win.c.
  • Non-ascii characters in con_wat.c have been replaced with escape sequences.
  • The function wOpenDir() has been added to dir_win.c.
  • The function cp_from_os_path_buffer() has been added to stritul.c.
  • The actions CMD_LS, CMD_FILEMODE and CMD_SET_FILEMODE have been renamed to CMD_READ_DIR, CMD_GET_FILE_MODE and CMD_SET_FILE_MODE respectively.
  • The actions CMD_FINAL_PATH, CMD_GET_ATIME_OF_SYMLINK, CMD_GET_FILE_MODE_OF_SYMLINK, CMD_GET_GROUP_OF_SYMLINK, CMD_GET_MTIME_OF_SYMLINK, CMD_GET_OWNER_OF_SYMLINK, CMD_SET_GROUP_OF_SYMLINK, CMD_SET_MTIME_OF_SYMLINK and CMD_SET_OWNER_OF_SYMLINK have been added.... read more
Posted by Thomas Mertes 2023-12-17

New Seed7 Release 2023-11-04

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • In tim_rtl.c the function timFromIntTimestamp() has been fixed to work with negative timestamps under Windows. Many thanks to Liam O'Brien for pointing out that "chk_all" failed on the "chktime" test in Windows.
  • The answer concerning return type overloading in the FAQ has been improved.
  • In the manual links have been added to the list of parsing errors. The links refer to an example that triggers this parsing error.
  • The error messages of the interpreter and compiler have been improved:
    • If something is redeclared an additional error has been added that refers to the previous declaration. Additionally the lines of current and previous declarations are shown.
    • Error messages referring to functions have been improved to write function parameter names.
    • Now longer identifiers are written correctly in error messages.
  • The utility program sydir7.sd7 has been improved to support the options -t (only do time corrections of identical files) and -a (only add files that are missing in the destination).
  • The new library aes_gcm.s7i has been added. This library supports the AES GCM cipher.
  • Support for the AES GCM cipher has been added to the tls.s7i library.
  • The constant stdEccKeyPair has been added to elliptic.s7i. This constant defines public and private keys for elliptic curve cryptography (ECC).
  • The constant stdEccCertificate has been added to x509cert.s7i. This constant defines a certificate for elliptic curve cryptography.
  • The function readLink(filePath, ABSOLUTE) has been added to the library osfiles.s7i.
  • In bitdata.s7i the functions getBitLsb(), getBitsLsb(), getBitMsb() and getBitsMsb() with a file as parameter are deprecated now. The functions with the types lsbBitStream and msbBitStream should be used instead.
  • The library zstd.s7i has been refactored to use lsbBitStream instead of the deprecated functions getBitLsb and getBitsLsb.
  • The handling of the TIFF magic number in the tiff.s7i library has been improved.
  • In seed7_05.s7i the function isDigitString(), with the base as parameter, has been fixed to correctly check the range of possible digits. Additionally the function now raises RANGE_ERROR if the base is less than 2.
  • In seed7_05.s7i the function integer(), with the base as parameter, has been fixed to trigger RANGE_ERROR if a digit is not in the allowed range.
  • The function sourceLine(PROGRAM) has been added to the environment.s7i library.
  • The compiler (s7c.sd7) has been improved:
    • Do not optimize constants with -oc0
    • Call optimize_int_add starting with -oc2
    • Optimize string expressions starting with -oc2
    • The compilation stops if unsupported options are found.
    • Optimizations for the string pos function have been added:
      • If the main string is actually a byte string.
      • If the search string is known to have a length of 1.
      • The main string length for char search is reduced if there are previous occurrences of the last characters.
    • An optimization for div and rem operators has been added that takes effect if the dividend is known to be >= 0 and the divisor is a power of two.
    • The optimization of mod has been improved to consider the case that dividend or divisor is always >= 0.
    • The optimization of addition-/subtraction-chains has been improved to optimize more overflow checks away.
    • The optimization of the integer negate operation has been improved.
    • An optimization for the assignment of an array concatenation has been added.
    • Unnecessary range checks in the conversion from integer to byte strings have been omitted.
    • The compiler counts if range checks are optimized away, and the count is written in the compilation statistics.
    • The code generation of several assignment statements has been refactored.
    • An optimization for the string length has been added, if the result is known at compile-time.
    • The computation of possible integer expression results in lib/comp/intrange.s7i has been improved:
      • The function getIntRange has been improved to work for inline parameters.
      • The determination of of possible left shift results has been improved (in the function getIntLshiftRange). Corresponding tests have been added to chkint.sd7 and chkovf.sd7.
      • The range of possible loop variable values of for-downto loop has been fixed. Tests for this case have been added to chkprc.s7i.
      • The estimation of possible integer results of the div, mdiv and ? : operators has been improved.
      • The possible result of string search and string length is estimated more accurately.
      • The possible result of a binary to integer conversion is estimated more accurately. Corresponding tests have been added to chkint.s7i
      • The function getIntRange has been improved to consider the actions CMD_FILESIZE, CON_HEIGHT, CON_WIDTH, DRW_HEIGHT, DRW_WIDTH, DRW_SCREEN_HEIGHT, DRW_SCREEN_WIDTH, INT_BYTES_BE_2_INT, INT_BYTES_LE_2_INT, INT_FACT, INT_PARSE1 and INT_PLUS.
      • The functions getIntBytes2IntRange, getIntBytes2UIntRange, getIntRange, getArrLenRange, getStrLenRange, lessEqualLimit, greaterEqualLimit, getIntParse1Range and getBlnTernaryRange have been added.
    • An error in the bytes2Int optimization has been fixed and corresponding tests have been added to chkint.sd7.
    • The compiler options have been refactored (they are now stored locally instead of globally).
  • The programs bas7.sd7 and pv7.sd7 have been refactored to use mdiv instead of div (since the dividend is known to be >= 0).
  • The Seed7 build system has been improved:
    • Now the system libraries needed for bigInteger, console, database and drawing support (SYSTEM_BIGINT_LIBS, SYSTEM_CONSOLE_LIBS, SYSTEM_DATABASE_LIBS, SYSTEM_DRAW_LIBS) are stored as string with a newline (\n) between individual libraries.
    • The functions removeQuotesFromQuotations, appendToMakeMacros, replaceUnquotedSpacesWithNl, visualDepthOf32BitsSupported and defineCMacro have been added to chkccomp.c.
    • Building Seed7 with tcc under Windows has been fixed.
    • The makefiles have been adjusted to work with CLion.
    • The warning about missing packages has been improved.
    • The description of the build system in src/read_me.txt and src/read_me.htm has been improved.
  • In cmd_unx.c, infile.c, pol_sel.c, pol_unx.c, sql_oci.c and symbol.c a memory leak is avoided if realloc fails.
  • The action CMD_READLINK has been renamed to CMD_READ_LINK.
  • Empty statements (;;) have been removed in fltlib.c, gkb_win.c, pcs_win.c and sql_fire.c.
  • Spelling corrections have been made in several files.
  • Comments in C files have been changed to use the term function instead of the term procedure.
  • Documentation comments have been added or improved in bitdata.s7i, cipher.s7i, chkccomp.c, numutl.c, pcs_win.c and striutl.c.... read more
Posted by Thomas Mertes 2023-11-04

New Seed7 Release 2023-09-13

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • The parameters of getHttp(), getHttps() and getFtp() have been renamed from 'url' to 'location'. A location is a URL without http://, https:// and ftp://, respectively. Many thanks to Liam O'Brien for pointing out that getHttps("https://example.com/") does not work. The documentation has been improved to contain the example getHttps("example.com").
  • The exit() function has been moved from seed7_05.s7i to the library environment.s7i. Many thanks to u/IllegalMigrant for pointing out that exit() was not documented.
  • The libraries lower.s7i, more.s7i, upper.s7i, archive_base.s7i, http_response.s7i, makedata.s7i, tar_cmds.s7i and tee.s7i have been added to the library section and the subject index of the homepage. Many thanks to Liam O'Brien for pointing out that they were missing.
  • The contrast of menus in the Seed7 homepage has been improved. Many thanks u/SachemAgogic for pointing out that the contrast was too low.
  • The make7 example program has been improved to support C++. Now the macros CXX and CXXFLAGS are supported as well as the target .cpp.o and the pattern rule "%.o" with a dependency of "%.cpp" (changes have been made in make.s7i and makedata.s7i).
  • Chapters about the types 'database' and 'sqlStatement' have been added to the manual.
  • The file to generate a man page for the Seed7 compiler (doc/s7c.1) has been improved.
  • A test program for time functions (chktime.sd7) has been added.
  • The program findchar.sd7 has been improved to support the option -e (specify extension) and to allow a search for any char (with the option c).
  • The program calc7.sd7 has been improved to support the function
    getFtp().
  • The program tar7.sd7 has been improved:
    • Wildcards can be used when an archive is created. This works even if the OS shell does not support wildcards.
    • Specific members from an archive can be requested when an archive is extracted (or when listing archive contents with tell).
  • The library tar_cmds.s7i has been improved to support the changes of tar7.sd7.
  • In lib/comp/int_act.s7i the integer overflow checks created by the compiler have been improved. This improvement is used if both factors are unknown at compile time and for C compilers that have neither builtin overflow operations, nor an option like -ftrapv, nor support for 128-bit integers.
  • Tests for the improved overflow checks have been added to chkint.sd7 and chkovf.sd7.
  • In the library makedata.s7i, the rule 'name' has been renamed to 'target'. The library make.s7i has been adjusted to use 'target'.
  • In scanfile.s7i and scanstri.s7i the functions getNextXmlAttribute() and getNextHtmlAttribute() have been aligned to behave identically if there are no more attributes in a tag.
  • In htmldom.s7i the function readHtmlNode has been adjusted to the change of getNextHtmlAttribute().
  • Several improvements have been made in the time.s7i library:
    • The function time() with a micro seconds parameter has been added.
    • The function toLocalTZ() has been added.
    • The functions hashCode(), toUTC(), timestamp1601() and timestamp1601ToTime() have been fixed to work correctly.
  • In duration.s7i the function hashCode() has been fixed to work correctly.
  • In httpserv.s7i the functions processHttpRequest() and getRequest() have been renamed to getHttpRequest(). The webserver comanche.sd7 has been changed to call getHttpRequest() instead of getRequest().
  • In tee.s7i the type teeFile has been improved to allow writing to many files at once.
  • The libraries lower.s7i, more.s7i, tee.s7i and lower.s7i have been refactored to use camel case identifiers and documentation comments.
  • In asn1.s7i the struct asn1DataElement has been changed. Using the tagCategory of an asn1DataElement is deprecated now. Use tagType instead of tagCategory as tagType is also used in the ASN.1 documentation. The renaming has also been done in x509cert.s7i.
  • The program chk_all.sd7 has been improved to write a warning if the execution of a test program fails.
  • Tests for hash tables with time keys and values have been added to chkhsh.sd7.
  • In tim_rtl.c the function timSetLocalTZ() has been improved to raise RANGE_ERROR if a value is not in the allowed range.
  • In sql_cli.c and sql_lite.c calls of timSetLocalTZ() have been simplified.
  • The abstract data type (template) to define enumeration types has been moved from seed7_05.s7i to the new enumeration.s7i library.
  • In drw_emc.c and gkb_emc.c opening a window with a requested size has been improved to work correctly if the Firefox window is maximized.
  • Logging functions have been added in con_emc.c, drw_emc.c, emc_utl.c, gkb_emc.c, tim_rtl.c and tim_unx.c.
  • In str_rtl.c comments about the silencing of a C compiler warning have been added to strHeadAssign() and strHeadTemp().
  • In common.h the definitions of TIME_T_MIN, TIME_T_MAX and inTimeTRange() have been improved.
  • Documentation comments have been added or improved in ar.s7i, archive_base.s7i, array.s7i, asn1.s7i, bitset.s7i, bitsetof.s7i, boolean.s7i, cpio.s7i, ftp.s7i, gethttp.s7i, gethttps.s7i, hashsetof.s7i, http_response.s7i, httpserv.s7i, idxarray.s7i, lower.s7i, makedata.s7i, more.s7i, pkcs1.s7i, rpm.s7i, scanfile.s7i, scanstri.s7i, sql_base.s7i, tar.s7i, tar_cmds.s7i, tee.s7i, time.s7i, upper.s7i, zip.s7i, tim_rtl.c and tim_unx.c.... read more
Posted by Thomas Mertes 2023-09-13

New Seed7 Release 2023-07-09

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • Explanations about the initialization with 'is', the 'return' declaration construct and the meaning of dollar signs have been added or improved in the FAQ.
  • A chapters about arrays has been added to the tutorial.
  • In the manual, chapters about variants of for-each loops have been added or improved.
  • A chapter about the exception GRAPHIC_ERROR has been added to the manual.
  • The compiler (s7c.sd7) has been improved:
    • The generated code for array indexing that always raises INDEX_ERROR, has been improved to be accepted by clang. A cast to the desired type has been added.
    • The code generation for the hash set functions card() and rand() has been improved to support temporary sets.
    • Spezialized code is now generated, if the hash set function rand() is used with constant sets.
    • The functions strHeadAssign and strTailAssign are used now. They are always called like this: aString = strHeadAssign(aString, pos);
  • In the library gzip.s7i the functions length() and tell() have been added for a gzipWriteFile.
  • In the library tar.s7i the function putFile() has been improved to check for seekable() before aplying seek().
  • The function pemObject() which creates a PEM object from 'pemType' and 'content' has been added to pem.s7i.
  • Support for the generation of non-self-signed certificates has been added to the x509cert.s7i library.
  • Support for X509 extensions has been added to the x509cert.s7i library.
  • A function to create an x509Name has been added to x509cert.s7i.
  • In x509cert.s7i several things have been renamed:
    • The types validityType and nameType have been renamed to x509Validity and x509Name respectively.
    • The function getName() has been renamed to getX509Name().
    • The parameter encryptionKey has been renamed to issuerKey.
  • In x509cert.s7i the type x509cert is deprecated now. The type x509Cert should be used instead.
  • In asn1.s7i and x509cert.s7i parameters and result variables have been renamed from 'stri' to 'asn1'.
  • In pkcs1.s7i an additional function to generate a RSA key pair has been added.
  • Now 'in varfunc' call-by-name parameters can be specified with 'in' and 'ref'. This is done in the library seed7_05.s7i by defining IN_PARAM_IS_REFERENCE(varfunc aType).
  • In seed7_05.s7i the boolean condition parameters of loops have been changed to be defined with 'ref'. This corresponds to the fact that changing a condition variable in the loop body can terminate the loop.
  • The test suite has been improved to increase the code coverage.
  • A test program for enumerations (chkenum.sd7) has been added.
  • Tests have been added to chkbig.sd7:
    • Tests for bigInteger comparisons (=, <>, <, <=, >=, > and compare).
    • Tests for the optimization of ord(a mod b).
    • Tests for the multiplication of a constant with a bigInteger.
    • Tests for the divRem operator and for the rand and gcd functions.
    • Tests for the modulus of a bigInteger by a power of two.
  • Tests have been added to chkbin.sd7:
    • Tests for the bin64 &, | and >< operators.
    • Tests for the optimization of bin64(a mod b).
    • Tests for bin64 shift operator have been improved.
  • Tests have been added to chkbst.sd7:
    • Tests for bstring length.
    • Improve tests for bstring assignments.
  • Tests have been added to chkchr.sd7:
    • Tests for char literals and conversions
    • Tests for the char functions succ(), pred(), lower() and upper().
  • Tests in chkhsh.sd7 have been improved:
    • Tests for hash tables with enumeration type keys and values have been added.
    • Tests for hash tables with bstring keys and values have been added.
    • Tests for hash tables with bitset keys and values have been added.
    • Tests for hash keys() and values() function have been added.
  • Tests in chkstr.sd7 have been improved:
    • Tests for c_literal() have been added.
    • Tests for string head (stri[.. stop]) have been added.
    • Tests for string tail (stri[start ..]) have been added.
    • Tests for the string pos(), rpos() and replace() functions have been added. These tests trigger a Boyer-Moore string search.
    • Tests for fromUtf8() have been added.
    • Tests for lower() and upper() have been added.
    • Tests for string assignment have been added.
  • Tests for the expression A * B ** C have been added to chkint.sd7 and chkovf.sd7.
  • Tests for string head (stri[.. n]) and string tail (stri[n ..]) have been added to chkidx.sd7.
  • In chkset.sd7 tests for the hash set functions card(), rand() and toArray() have been added. Tests for the operators 'in' and 'not in' have been added as well.
  • In chkprc.sd7 tests for for-until loops have been added.
  • Tests for the type clib_file and for the functions seekable(), tell(), bigTell() and seek() have been added to chkfil.sd7.
  • The handling of the version level (the last number in the version string) has been improved:
    • The file src/level_rl.h which contains the release level has been introduced.
    • The files src/level.h and src/level_bk.h have been removed from the release.
    • In the makefiles the target distclean has been improved to remove src/level.h and src/level_bk.h.
    • The program levelup.c has been improved to maintain the file level.h. If level_rl.h has changed it will be copied to level.h. If there is no change in level_rl.h every compilation of s7 will increment the level.
    • The program wrdepend.c has been improved to check if level.h is missing. In this case, level_rl.h is copied to level.h.
    • The minor version number of s7 and s7c has been incremented.
  • In seed7_05.s7i, forloop.s7i, chkarr.sd7, chkbig.sd7, chkbin.sd7, chkbst.sd7, chkfil.sd7, chkflt.sd7, chkidx.sd7, chkint.sd7, chkovf.sd7, chkset.sd7 and chkstr.sd7 'ref func' parameters have been replaced with 'in func' parameters.
  • In chk_all.sd7, chkarr.sd7, chkfil.sd7, chkidx.sd7, chkovf.sd7 and chkstr.sd7 'ref proc' parameters have been replaced with 'in proc' parameters.
  • In str_rtl.c the functions strHeadAssign and strTailAssign have been introduced. These functions leave the string parameter intact in case of an error.
  • In str_rtl.c the function strHeadTemp has been refactored to assume that the string parameter is always tempory and can be freed in case of an error.
  • Documentation comments have been improved in pem.s7i and x509cert.s7i.... read more
Posted by Thomas Mertes 2023-07-09

New Seed7 Release 2023-05-29

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • The FAQ concerning break and continue has been improved.
  • Chapters about assignment and constants have been added to the tutorial, which is part of the manual. A description of the function fraction() has been added to the chapter about predefined types.
  • The new library archive_base.s7i has been added. This library defines common functions for file archives. It currently defines the function readDir() which is used by the archive libraries ar.s7i, cpio.s7i, rpm.s7i, tar.s7i and zip.s7i.
  • In the zip.s7i library the function readDir() has been improved to work for absolute paths (by calling readDir() from archive_base.s7i).
  • Several improvements have been made in the rpm.s7i library:
    • The signature section digests are checked when the RPM file is opened.
    • The payload digests are only checked if the payload is used.
    • Provided and required dependencies are read when the RPM file is opened.
  • The compiler (s7c.sd7) has been improved:
    • It recognizes if an array index access would always raise INDEX_ERROR. This is done for a constant array and with the range of possible index values.
    • The optimization of the floating point power operator with an integer exponent has been improved. There are cases where the base is constant, and the range of possible exponents allows a simplification.
    • The optimization of the floating point left and right shift operators has been improved. It considers cases where the number that needs to be shifted is constant and cases where nothing is constant. In both situations the range of possible shift amounts allows simplifications.
    • The optimization of A * B ** C with A and B float and C integer, has been improved. This considers cases where B is a power of two and the range of possible exponents C allows a simplification.
    • It is recognized if the integer left shift operator would always raise OVERFLOW_ERROR. Depending on the range of possible values for the shift amount and the value to be shifted, this optimization is made.
    • The number of checks for OVERFLOW_ERROR and NUMERIC_ERROR of the integer power operator has been reduced. Depending on the range of possible values for base and exponent, some checks can be omitted.
    • Now the range of possible integer values is determined for the expression ord(aBigInteger mod 2_ ** n).
    • Now the range of possible integer values is determined for the length of a sub-string.
    • The generated code for 'elsif FALSE then end if' as been fixed.
    • String index checks are optimized away if the range of possible index values always remains inside a constant string.
    • Computing the length of a fixLen substring has been optimized (e.g.: length(aString[A fixLen B]) will always return B).
    • The optimization of the string length function has been changed to sum up the length of the components as integers.
  • The test suite has been improved to increase the code coverage of the compiler.
  • Tests for array assignment, array length and array index access have been added to chkarr.sd7.
  • Tests of the optimization of expressions like ord((A + B) mod C) (the modulus of a bigInteger sum converted to an integer) have been added.
  • Several tests have been added to chkflt.sd7:
    • Tests for float left shift (<<).
    • Tests for float right shift (>>).
    • Tests for float ** integer.
    • Tests for the A * B ** C optimization.
    • Tests for float ** float.
    • The tests for decompose() have been improved.
    • Tests for ceil(), floor() and trigonometric functions have been added.
  • Tests for the power operator (**) and for the integer >>:= operator have been added to chkint.sd7.
  • Tests for the overflow of shift left (<<) and for the power operator (**) have been added to chkovf.sd7.
  • Tests for string head have been added to chkidx.sd7.
  • Tests for empty if-, while- and repeat-statements have been added to chkprc.sd7.
  • Tests for card(), rand() and assignment have been added to chkset.sd7.
  • Several tests have been added to chkstr.sd7:
    • Tests for string length.
    • Tests for string index access.
    • Tests for the string head function.
    • Tests for string concatenation.
    • Tests for string assignment.
  • The phrase "works correct" has been replaced with "works correctly" in the files chk_all.sd7, chkarr.sd7, chkbig.sd7, chkbin.sd7, chkbigdata.sd7, chkbool.sd7, chkbst.sd7, chkchr.sd7, chkcmd.sd7, chkexc.sd7, chkfil.sd7, chkflt.sd7, chkhsh.sd7, chkidx.sd7, chkint.sd7, chkovf.sd7, chkprc.sd7, chkset.sd7 and chkstr.sd7.
  • The value STMT_BLOCK_IN_PARENTHESES_OK has been added to confval.sd7.
  • The initialization of local variables and constants with a single local value has been fixed (in dcllib.c).
  • In flt_rtl.c the function fltLdexp() has been improved to work correctly for infinity, even if ldexp() does not.
  • The program chkccomp.c has been improved to determine LDEXP_OF_INFINITY_OKAY (which defines if ldexp() works for infinity).
  • Documentation comments have been improved in null_file.s7i.... read more
Posted by Thomas Mertes 2023-05-29

New Seed7 Release 2023-04-22

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • The compiler option -S to specify the stack size has been added. Many thanks to Bruce Axtens for pointing out problems with the Ackermann function at RosettaCode. This triggered the -S improvement.
  • Many thanks to Bruce Axtens for adding Seed7 to the Exercism project.
    Discussions about that resulted in several improvements:
    • Now call-by-name parameters can be specified with 'in' and 'ref'.
    • Support for syntax statements without $ (dollar) has been added.
    • The error message for an unspecified kind of in-parameter has been improved.
  • Many thanks to Gary Chike for pointing out problems:
    • The RosettaCode example "Convert decimal number to rational" did not work correct. To fix that, the function fraction(), which gets a fraction as string (e.g. "1/3"), has been added to bigrat.s7i and rational.s7i.
    • Mac OS 13.2.1 had permission problems when installing Seed7. The copying of manual pages failed. In mk_osx.mak and mk_osxcl.mak, the copying of the s7 and s7c manual pages to /usr/share/man/man1 has been changed to allow a failure.
    • On some computers, vim syntax highlighting is turned off by default. The FAQ has been improved to describe the steps for enabling vim syntax highlighting.
  • Explanations about design principles, compiler options, syntax highlighting, forward declarations, function overloading, function declarations and declaring break/continue statements have been added or improved in the FAQ.
  • Chapters about function declarations and overloading have been added to the tutorial (part of the manual).
  • In the manual the chapters about types, parameters and expressions have been improved.
  • In seed7_05.s7i the function literal() has been defined for enumeration types.
  • The files panic.sd7, wiz.sd7, savehd7.sd7, cards.s7i, sql_base.s7i and boolean.s7i have been changed to use the new function literal().
  • Support for the ternary operator ?: has been added for enumerations and for the types 'type' and 'category'.
  • The compiler (s7c.sd7) has been improved:
    • At several places the function integerLiteral() is used instead of str() to create integer literals.
    • Assignments to temp variables in inline functions have been fixed. This allows: float parse ("0." & "0" mult 307 & "1")
    • If-statements are used in overflow checks for the operators +:=, -:=, *:=, <<:= and >>:=.
    • Generated temporary variables have been renamed in int_act.s7i.
    • The code of the factorial function has been optimized.
    • Support for the action ENU_LIT has been added.
    • The action ENU_LIT has been added to the list of special actions.
    • Allocated result data of inlined special actions is now freed.
    • Now integer comparisons are checked with -oc3 if they can be computed at compile time. With -w2, a warning is written if this is the case.
    • The compiler option -S to specify the stack size has been added.
  • In zip.s7i the function fileMode() has been fixed to work for short file names.
  • The test program chkflt.sd7 has been improved to have detailed error messages. Tests for converting between floats to strings in both directions have been added as well.
  • Definitions of LINKER_OPT_STACK_SIZE and DEFAULT_STACK_SIZE have been added to cc_conf.s7i. The file cmd_rtl.c and the program confval.sd7 have been adjusted accordingly.
  • The interpreter has been improved to support the actions DCL_SYNTAX, ENU_LIT and PRC_BEGIN_NOOP.
  • Support for empty func ... end func constructs has been added.
  • The error messages "Syntax declared twice", "Associativity expected", "Dot expression expected" and "Integer literal expected" have been improved in error.c.
  • The functions err_expr_type() and err_expr_obj_stri() have been added to error.c.
  • In fil_rtl.c the function filClose() has been improved to work correctly if fclose() fails after a previous error.
  • In flt_rtl.c the function fltParse() has been improved to consider STRTOD_ACCEPTS_INF, STRTOD_ACCEPTS_INFINITY, STRTOD_ACCEPTS_NAN and STRTOD_ACCEPTS_SIGN_WITHOUT_DIGITS.
  • In gkb_win.c definitions of XBUTTON1, XBUTTON2, WM_MOUSEWHEEL, GET_WHEEL_DELTA_WPARAM, VK_OEM_PLUS, VK_OEM_MINUS and VK_OEM_1 to VK_OEM_8 are added if they are not present in the include files.
  • In heaputl.c the function setupStack() has been improved to have the requested stack size as a parameter.
  • In os_decls.h the definition of safe_fileno() has been improved to use os_fileno() instead of fileno().
  • Functions for X11 selection (cut and paste) have been added to fwd_x11.c and x11_x.h.
  • In pcs_unx.c and pcs_win.c the function pcsPipe2() has been improved to leave childStdin and childStdout unchanged if the corresponding call of os_fdopen() fails.
  • The function prc_begin_noop() has been added to prclib.c.
  • In soc_rtl.c the functions socInetAddr(), socInetLocalAddr() and socInetServAddr() have been improved to set 'result' to NULL if ai_addrlen is negative.
  • The function prot_dot_expr() has been added to traceutl.c. This function is used to write the error message SYNTAX_DECLARED_TWICE.
  • The program chkccomp.c has been improved to determine STRTOD_ACCEPTS_SIGN_WITHOUT_DIGITS, STRTOD_ACCEPTS_INF, STRTOD_ACCEPTS_INFINITY, STRTOD_ACCEPTS_NAN, OS_GETCWD_INCLUDE_DIRECT_H, OS_OPENDIR_INCLUDE_DIRECT_H and FCLOSE_FAILS_AFTER_PREVIOUS_ERROR. The computation of FLOAT_NAN_COMPARISON_OKAY has been improved.
  • In chkccomp.c recent PostgreSQL versions are considered now.
  • In cmd_rtl.c and dir_drv.h the file direct.h is now conditionally included depending on OS_GETCWD_INCLUDE_DIRECT_H respectivily OS_OPENDIR_INCLUDE_DIRECT_H.
  • Includes of stdlib.h have been added to literal.c, sql_rtl.c, syvarutl.c and tim_rtl.c.
  • The makefiles mk_bcc32.mak, mk_bccv5.mak, mk_clangw.mak, mk_cygw.mak, mk_mingc.mak, mk_mingw.mak, mk_msvc.mak, mk_msys.mak, mk_nmake.mak and mk_tcc_w.mak have been improved to define DEFAULT_STACK_SIZE and LINKER_OPT_STACK_SIZE.
  • Documentation comments have been added to float.s7i and rational.s7i.... read more
Posted by Thomas Mertes 2023-04-22

New Seed7 Release 2023-03-05

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • The make7 example program has been improved to support quoted dependencies (changes have been made in makedata.s7i). A warning is written if the quoted dependency does not end with ", or when it is not followed by whitespace.
  • The comanche web-server example program has been improved:
    • CGI scripts with shebang are supported now. Shebang means that the first line of the script starts with #! and is followed by the command (and possible options) to interpret the script.
    • Now the root directories for HTML files (html-dir) and CGI files (cgi-dir) are converted to an absolute path.
    • On startup of comanche, the current working directory is changed to the root directory for CGI files (some CGI scripts need this).
    • The new option -c can be used to specify the cgi-name used in the HTTP(S) requests. If cgi-name is "", the cgi-name is taken from cgi-dir. Without -c, the default cgi-name of "/cgi-bin/" is used.
    • The new parameter env-file can be used to specify a property file with environment variables to be defined.
    • The help text written with the option -? or -h has been improved.
    • Definitions of the environment variables REQUEST_METHOD, CONTENT_LENGTH and DOCUMENT_ROOT have been added (in http_response.s7i). These environment variables are used by CGI scripts.
  • An explanation about the compilation to a dll/so has been added to the FAQ.
  • An explanation of the fixLen sub-string has been added to the manual.
  • The compiler s7c has been improved to read configuration values with the option -c. This allows s7c to be able to switch between generating machine code (default) or JavaScript/web-assembly (with -cemcc).
  • The compiler has been improved to generate better code for insert() (insert elements into an array). For arrays of plain values (e.g. array integer) unnecessary copying of data will be avoided now. Changes have been made in arr_act.s7i, expr_util.s7i, arr_rtl.c and arr_rtl.h.
  • The library propertyfile.s7i has been improved so that EOF terminates a property key or value.
  • The functions assignConfigValue() and readConfig() have been added to the cc_conf.s7i library.
  • In bitdata.s7i the close() function for LSB/MSB bit streams has been fixed to also work near the end of the file and for MSB bit streams.
  • In bitdata.s7i the function gets() has been improved so that a maxLength of 0 sets the position to the beginning of the next byte and returns an empty string. If bytePos is beyond the length of the string, an INDEX_ERROR is avoided.
  • In echo.s7i, editline.s7i, line.s7i, strifile.s7i and stritext.s7i the function gets() has been improved to always raise RANGE_ERROR for a negative maxLength. A maxLength of 0 always returns an empty string.
  • In png.s7i reading of PNG chunks has been refactored.
  • In gzip.s7i, iobuffer.s7i, lzma.s7i, strifile.s7i, xz.s7i and zstd.s7i the function seek() has been improved to raise RANGE_ERROR for positions <= 0.
  • In asn1.s7i, ccittfax.s7i, cli_cmds.s7i, csv.s7i, ftp.s7i, html.s7i, htmldom.s7i, http_response.s7i, makedata.s7i, stritext.s7i and wildcard.s7i, appending an element to an array has been improved. Now it is done with "anArray &:= element" instead of "anArray &:= [] (element)".
  • In chkstr.sd7 the tests for the functions lower() and upper() have been improved to use expression arguments.
  • In chkbig.sd7 tests for the bigInteger sci operator have been added.
  • Tests for close() of LSB/MSB bit streams have been added to chkbitdata.sd7.
  • The program chk_all.sd7 has been adjusted to the changes in chkbig.sd7 and chkbitdata.sd7.
  • The libraries bigint.s7i, bigrat.s7i, deflate.s7i, elliptic.s7i, encoding.s7i, gzip.s7i, inflate.s7i, iobuffer.s7i, lzma.s7i, png.s7i, rational.s7i, scanstri.s7i, strifile.s7i, stritext.s7i, xz.s7i and zstd.s7i have been improved to use fixLen sub-strings.
  • The program bas7.sd7 has been improved to use fixLen sub-strings.
  • In s7c.sd7 names of array and hash types have been refactored.
  • In bin32.s7i the deprecated functions bin32AsFourBytesBe and bin32AsFourBytesLe have been removed.
  • In bin64.s7i the deprecated functions bin64AsEightBytesBe and bin64AsEightBytesLe have been removed.
  • In bytedata.s7i the deprecated functions int16AsTwoBytesBe, int32AsFourBytesBe, int64AsEightBytesBe, int16AsTwoBytesLe, int32AsFourBytesLe, int64AsEightBytesLe, bigAsEightBytesBe and bigAsEightBytesLe have been removed.
  • In lzw.s7i the deprecated functions lzwEncodeMsb() and lzwDecodeMsb() have been removed.
  • In gzip.s7i the deprecated functions openGunzipFile(aFile) and openGzipFile(aFile) have been removed.
  • In arr_rtl.c the function arrInsertArrayTemp() has been added, and the function arrInsertArray() has been changed to leave the 'elements' array as is.
  • The "clean" target of the makefiles has been improved to only remove the libraries created by the same makefile.
  • The library names in mk_emccl.mak and mk_emccw.mak have been changed from .a to _emc.a. Additionally, the file ../bin/cc_conf_emcc.prop is created, when running make. This allows the Emscripten version of Seed7 to be installed parallely to the normal Seed7 installation.
  • The makefiles mk_mingw.mak and mk_nmake.mak have been improved to avoid the "file too big"/"too many sections" error.
  • Documentation comments have been improved in bitdata.s7i, echo.s7i, editline.s7i, keybd.s7i, line.s7i, osfiles.s7i, stritext.s7i, tls.s7i, arr_rtl.c, drwlib.c and kbdlib.c.... read more
Posted by Thomas Mertes 2023-03-05

New Seed7 Release 2023-01-30

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • The drivers used in the browser (when Seed7 is compiled with Emscripten) have been improved (in con_emc.c, drw_emc.c, fil_emc.c, gkb_emc.c, tim_emc.c and emc_utl.c). Now graphic Seed7 programs can be compiled to JavaScript and Webassembly to run them in the browser.
  • A new sub-string operation with a guaranteed length (fixLen) has been introduced. E.g.: "abcde"[2 fixLen 3].
  • 30 libraries have been adjusted to use the fixLen sub-string. The guaranteed sub-string length assures that conversions like bytes2Int() do not get data that is too short.
  • The library zip.s7i has been fixed to work correct if a descriptor signature follows the deflated data.
  • The library jpeg.s7i has been refactored to use the segment length for reading a segment into a string.
  • A close() function for LSB and MSB bit streams has been addded to bitdata.s7i. The close() sets the the position of the underlying file directly after the bit stream. This is used by the function inflate() (in the inflate.s7i library).
  • The function flush() has been added to the tee.s7i library.
  • Several characters in the fonts stdfont10.s7i, stdfont12.s7i, stdfont14.s7i, stdfont16.s7i, stdfont18.s7i, stdfont20.s7i, stdfont24.s7i, vecfont10.s7i and vecfont18.s7i have been improved.
  • Interpreter and compiler have been improved to support the action STR_SUBSTR_FIXLEN.
  • The compiler (s7c.sd7) has been improved:
    • Support for arcs with thickness has been added (action DRW_PFARC).
    • Code that reports a GRAPHIC_ERROR is now generated.
    • The optimizations for string sub-strings ("abcde"[2 len 3] and "abcde"[2 fixLen 3]) have been improved.
    • The optimizations for combinations of sub-string and conversion to integer (e.g.: bytes2Int(stri[5 fixLen 4], UNSIGNED, LE) ) have been improved.
    • The size of the generated init_values function has been reduced.
    • If requested by USE_DO_EXIT, the function doExit() is called at the end of the program.
    • Profiling data is stored in allocated memory instead of an array. Some C compilers had problems with the array approach.
  • The documentation in doc/faq.htm, doc/faq.txt, src/read_me.htm and
    src/read_me.txt has been updated.
  • More detailed error messages have been introduced in chkbig.sd7, chkint.sd7 and chkset.sd7.
  • Tests in chkint.sd7, chkstr.sd7 and chkidx.sd7 have been improved to check the new sub-string function (fixLen) with and without a subsequent conversion to integer.
  • Tests in chkidx.sd7 have been refactored to use if-statements instead of using an ok variable.
  • An optional event tracing has been added to con_win.c.
  • The event tracing in drw_win.c and gkb_win.c has been improved.
  • The program chkccomp.c has been improved to determine SYSTEM_RESULT_FOR_RETURN_0 in a way that works also with Emscipten.
  • The test programs to determine LIMIT_FMT_E_MAXIMUM_FLOAT_PRECISION and LIMIT_FMT_F_MAXIMUM_FLOAT_PRECISION in chkccomp.c have been improved to define the large array outside of main (Emsripten needs this).
  • In common.h the format strings for OS_OFF_T have been changed to prefer the long format if sizeof(int) = 4 and sizeof(long) = 4.
  • An include of traceutl.h has been added to actlib.c, biglib.c, blnlib.c, bstlib.c, chrlib.c, conlib.c, drwlib.c, fillib.c, fltlib.c, intlib.c, pcslib.c, pollib.c, setlib.c and strlib.c. This allows enabling LOG_FUNCTIONS with strict C compilers.
  • The function printSet() has been added to set_rtl.c. This function is used in set_rtl.c as replacement for prot_set() when LOG_FUNCTIONS is enabled. This allows logging in compiled programs.
  • Logging functions have been improved in arr_rtl.c, con_win.c, drw_win.c, drw_x11.c, fil_rtl.c and gkb_win.c.
  • Occurrances of exit() and atexit() have been replaced by os_exit() respectively os_atexit(). This way, the makefiles mk_emccl.mak and mk_emccw.mak can define os_exit() and os_atexit() to use doExit() and registerExitFunction() instead of the default functions.
  • JavaScript specific functions have been moved from fil_unx.c to new file fil_emc.c.
  • Keyboard functions have been moved from drw_emc.c to the new file gkb_emc.c.
  • The JavaScript keyboard drivers in con_emc.c and gkb_emc.c have been improved to work with synchronous I/O although JavaScript works asynchronous in the browser.
  • In the new file tim_emc.c the function timAwait() has been introduced. This function saves keypresses that happen during the wait (it works together with the keyboard drivers from con_emc.c or gkb_emc.c).
  • The new file emc_utl.c has been introduced. This file contains registerExitFunction() and doExit() which replace atexit() and exit() under Emscripten. It also defines enqueue() and dequeue() which are used during timAwait() to queue keypresses. And finally, it defines mapKeyNameIdToKey() which is used by the keyboard drivers.
  • Functions to register and execute callbacks have been added to pre_js.js.
  • The makefiles mk_emccl.mak and mk_emccw.mak have been improved to use the linker options ASYNCIFY, ASYNCIFY_STACK_SIZE and EXIT_RUNTIME. The new files emc_utl.c, fil_emc.c, tim_emc.c and gkb_emc.c have also been added.
  • JavaScript strings in the .c files have been refactored to use " instead of '.
  • The definition of USE_DO_EXIT has been added to cc_conf.s7i. The file cmd_rtl.c and the program confval.sd7 have been adjusted accordingly.
  • The keyboard driver gkb_x11.c has been improved to work correctly when the keyboard layout is switched.
  • Documentation comments have been improved in string.s7i, str_rtl.c and strlib.c.... read more
Posted by Thomas Mertes 2023-01-30

New Seed7 Release 2022-12-18

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • Examples for reading from the keyboard have been added to the manual.
  • In src/read_me.txt and src/read_me.htm the description "compiling Seed7 under windows with cl from MSVC" has been improved. The description of possible C compiler warnings has also been improved.
  • Support for the ternary operator ?: has been added to the types bitset, color, duration and time.
  • The graphic keyboard test program gkbd.sd7 has been improved to support super/windows keys.
  • Definitions of KEY_SUPER, KEY_LEFT_SUPER and KEY_RIGHT_SUPER have been added to the libraries keybd.s7i and keydescr.s7i.
  • The tls.s7i library has been improved to reopen a socket if the old session cannot be reused.
  • In gif.s7i a small error in reading a GIF header has been fixed.
  • The compiler (s7c.sd7) has been improved:
    • Unsupported Seed7 compiler options trigger a warning now.
    • Better optimizations for abs(), mdiv and mod are done.
    • More integer overflow checks of abs(), <<, *, div, mdiv, mod and rem are optimized away (with option -oc3).
    • More division by zero checks are optimized away.
    • Computing the range of possible integer results for abs(), bitLength(), log2(), log10(), sqrt() +, -, <<, >>, - (negate), * and ?: (ternary operator) has been improved. This also helps in reducing the number of integer overflow checks.
    • The statistics about integer overflow checks and division checks have been improved.
    • A warning is written at a catch of otherwise when checks for an exception have been suppressed (this is done with -w2).
  • The code coverage of the integer tests in chkint.sd7 and chkovf.sd7 has been increased. Now, all code in comp/int_act.s7i is tested (except code for non-twos-complement computers).
  • Several tests in chkint.sd7 have been refactored to avoid optimizations that skip tests (Expressions are compared with intExpr(value) instead of just value).
  • Documentation comments have been improved in time.s7i.
  • The graphic driver for windows (drw_win.c) has been improved:
    • Windows are now created with a size that includes decorations.
    • The windows class is registered with with RegisterClassExW() now. This triggers the creation of Unicode windows (where keypresses return Unicode characters).
    • A function to draw filled chords (drwPFArcChord) under windows has been added.
    • An empty window is just created once on initialization and stored globally.
  • The graphic keyboard driver for windows (gkb_win.c) has been improved:
    • The function getc(GRAPH_KEYBOARD) now returns Unicode characters.
    • Dead keys are returned directly and are not combined with the next character pressed (this combining can be done by the program).
    • Holding down a windows/super key and pressing a cursor key is supported now (this resizes and moves the current active window). In this case the program now receives KEY_RESIZE characters (if they have been requested with selectInput()).
    • Combinations of CTRL + ALT + letter are now recognized correctly (CTRL is preferred over ALT in combinations with a letter).
    • The combination of cursor, function and mouse keys with modifier keys now prefers SHIFT over the other modifiers and CTRL over ALT.
    • The recognition of button presses in gkbButtonPressed() has been improved to also work for Unicode characters.
    • Now wide char functions (CreateWindowW(), CreateWindowExW(), MapVirtualKeyW(), PeekMessageW(), GetMessageW()) are used and only correctly received messages are processed.
    • The lowest four bits of a system command (wParam of WM_SYSCOMMAND message) are ignored now.
    • Macros are used to recognize mouse wheel and xbuttons.
    • Macro definitions have been added, as some C compilers do not provide them.
  • The graphic keyboard drivers (gkb_win.c and gkb_x11.c) have been improved to support super/windows keys.
  • The support for the unused action CHR_CONV has been removed.
  • The number of C compiler warnings has been reduced.
  • Unnecessary initialisations and assignments have been removed in several C files.
  • Usages of strcpy() and wcscpy() have been reduced.
  • In hshlib.c the hash table for-loops have been adjusted to process the elements in the same succession as in compiled programs. The code has also been simplified.
  • The program chkccomp.c has been improved:
    • Now, a backup copy of the source file (e.g. ctest123.cbak) is created if a test program fails.
    • Now, an empty output of a test program is recognized and the test is repeated (Some anti-virus software of Windows may trigger this).
    • Now, it considers wasm files for an Emscripten build.
    • The macros os_setmode, os_fdopen and os_fileno are determined.
  • Usages of isatty(), fdopen() and fileno() have been replaced by os_isatty(), os_fdopen() and os_fileno() respectively.
  • Some fixes for Emscripten have been done:
    • The files mk_emccl.mak and mk_emccw.mak have been adjusted for the newest version of Emscripten. Now, there is source information in a stack trace, and the stack size used by Emscipten has been increased.
    • In chkccomp.c wasm files are considered now.
    • The size of functions has been reduced in chkchr.sd7, chkint.sd7 and chkstr.sd7. This avoids a stack overflow in Node.js.
  • Logging functions have been added or improved in drw_win.c, gkb_win.c, gkb_x11.c and intlib.c.... read more
Posted by Thomas Mertes 2022-12-18

New Seed7 Release 2022-11-05

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • The picture viewer pv7.sd7 has been improved to support zooming and moving.
  • The graphical keyboard test program gkbd.sd7 has been improved to write the cursor position when a mouse key is clicked.
  • The function isLetter() in char.s7i has been improved to support Unicode 15.0.
  • When matching an expression failed, two errors were reported. A match error and an exception error (Exception MEMORY_ERROR raised). The unnecessary exception error has been removed from interpreter and compiler.
  • Additional versions of getPixmap() have been added to the library draw.s7i.
  • In x509cert.s7i the algorithm OID of the signature in stdCertificate and other generated certificates has been corrected.
  • The function getDigestOidFromSignatureAlgorithm() has been added to x509cert.s7i.
  • In syntax.s7i the definition of the ternary operator (a ? b : c) has been improved to allow chaining (e.g.: a ? b : c ? d : e).
  • The function fromAsciiz() has been added to bytedata.s7i.
  • Functions to convert null terminated UTF-16 strings (fromNullTerminatedUtf16Be(), fromNullTerminatedUtf16Le(), getNullTerminatedUtf16Be() and getNullTerminatedUtf16Le()) have been added to unicode.s7i.
  • In editline.s7i the function getln() has been improved to use a case-statement instead of an if-then-else chain.
  • Tests for the new conversion functions of unicode.s7i have been added to chkstr.sd7.
  • The program chkchr.sd7 has been adjusted to test the improved function isLetter().
  • The graphic keyboard driver of Windows (in gkb_win.c) has been improved to return the mouse wheel button position in window coordinates (instead of screen coordinates).
  • In gkb_win.c usages of the macros LOWORD and HIWORD have been replaced with GET_X_LPARAM and GET_Y_LPARAM.
  • In prclib.c the functions prc_begin(), prc_local(), prc_res_begin(), prc_return(), prc_return2(), prc_varfunc(), prc_varfunc2() have been improved to raise CREATE_ERROR instead of MEMORY_ERROR, if the block_body is NULL. This removes an unnecessary MEMORY_ERROR when matching an expression fails.
  • In chr_rtl.c the function chrIsLetter() has been improved to support Unicode 15.0.
  • In drw_x11.c the function drwGetPixmap() has been improved to set destination pixels from areas outside of the source window to black.
  • Logging functions have been improved in exec.c, expr.c and syntax.c.
  • The console keyboard drivers (in kbd_inf.c and kbd_poll.c) have been improved to support reading of alt-A to alt-Z when upper case letters are pressed.
  • In gkb_x11.c the performance of setupModState() has been improved.
  • Build now uses the macro POTENTIAL_PARTIAL_LINKING_OPTIONS
  • The graphic keyboard driver of Linux (in gkb_x11.c) has been improved to reduce number of XQueryKeymap() calls
  • Parameters in bin32.s7i and bin64.s7i have been renamed.
  • Undocumented functions to cast between integer and float have been removed from float.s7i.
  • In wildcard.s7i the function findMatchingFiles() has been improved to support case insensitive pattern matching.
  • The library cli_cmds.s7i has been improved to use case insensitive file pattern matching for DOS/Windows commands.
  • The files chkccomp.c, mk_djgpp.mak and mk_djgp2.mak have been altered to take into account that error redirection with 2> fails under DOS.
  • Support for the actions FLT_CAST and FLT_ICAST has been removed from interpreter and compiler.
  • Spelling errors have been fixed in faq.htm, faq.txt, manual.htm, manual.txt, chlog.txt, bitdata.s7i, bmp.s7i, ftp.s7i, gif.s7i, ico.s7i, jpeg.s7i, pem.s7i, png.s7i, ppm.s7i, tiff.s7i, sql_cli.c, striutl.c.
  • Documentation comments have been improved in bytedata.s7i, char.s7i, draw.s7i, chr_rtl.c, chrlib.c and drw_win.c.... read more
Posted by Thomas Mertes 2022-11-05

New Seed7 Release 2022-07-24

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • The operating system DOS is supported (with DJGPP) again. The tests have been done with Dosbox.
  • Explanations about syntax highlighting, static type checking and return type overloading have been improved in the FAQ.
  • In the manual, the chapter about the keyboard has been improved to explain the window close button and window resize events. The manual has also been adjusted to describe the new functions instead of the deprecated ones.
  • The error messages for failed declarations have been improved.
  • The error reporting has been improved to also show an error line if parsing the file has finished.
  • Reading from a Windows console with getc(KEYBOARD) has been improved to support all Unicode characters (including characters outside of the Basic Multilingual Plane). This allows the reading of characters that have been pasted from the clipboard to a console window.
  • The functions inputReady(), getc(aFile, NO_WAIT), clickedXPos() and clickedYPos() have been added to keybd.s7i.
  • The functions toUtf8(), fromUtf8(), toUtf16Be(), fromUtf16Be(), toUtf16Le(), fromUtf16Le() and fromUtf7() have been added to unicode.s7i.
  • The functions toUtf16Be() and toUtf16Le() raise RANGE_ERROR if a surrogate character is present.
  • The functions fromUtf16Be() and fromUtf16Le() raise RANGE_ERROR if an invalid surrogate pair is found (a single surrogate character or surrogate characters not in the proper succession).
  • In unicode.s7i the function replaceUtf16SurrogatePairs() has been fixed to work correctly.
  • Tests for toUtf16Be(), fromUtf16Be(), toUtf16Le(), fromUtf16Le() and replaceUtf16SurrogatePairs() have been added to chkstr.sd7.
  • Several improvements have been done in chkccomp.c:
    • If reading a numeric test result fails, the program waits for a second before restarting the test.
    • It shows an error message if a test fails to deliver a numeric result.
    • It does not create an empty test program. Some anti virus software considers an empty program to be dangerous.
    • It determines if partial linking is actually working.
    • A list of potential partial linking options is tested to find the correct one.
    • The number of warnings has been reduced.
  • In tim_dos.c, tim_unx.c and tim_win.c the function timNow() has been improved to work also for an unsigned time_t.
  • The support for the unused action SCT_ELEM has been removed.
  • In keybd.s7i the functions keypressed(), busy_getc(), getxpos() and getypos() are deprecated now. The functions inputReady(), getc(aFile, NO_WAIT), clickedXPos() and clickedYPos() should be used instead.
  • The files dialog.s7i, bas7.sd7, carddemo.sd7, castle.sd7, clock.sd7, clock2.sd7, clock3.sd7, dnafight.sd7, ftp7.sd7, gkbd.sd7, hal.sd7, kbd.sd7, klondike.sd7, lander.sd7, mahjong.sd7, mandelbr.sd7, mirror.sd7, pac.sd7, pairs.sd7, panic.sd7, planets.sd7, prime.sd7, pv7.sd7, rand.sd7, savehd7.sd7, shisen.sd7, sl.sd7, snake.sd7, sokoban.sd7, sudoku7.sd7, tet.sd7, tetg.sd7 and wator.sd7 have been altered to use inputReady(), getc(aFile, NO_WAIT), clickedXPos() and clickedYPos() instead of the deprecated functions.
  • In keybd.s7, the implementation of getc(aFile, NO_WAIT) is now based on inputReady(). The primitive actions KBD_BUSY_GETC and GKB_BUSY_GETC are not needed anymore.
  • The support for the primitive actions KBD_BUSY_GETC and GKB_BUSY_GETC has been removed from interpreter and compiler. Changes have been done in drwlib.c, drwlib.h kbdlib.c, kbdlib.h, primitiv.c, comp/action.s7i, comp/gkb_act.s7i and comp/kbd_act.s7i.
  • The actions GKB_KEYPRESSED and KBD_KEYPRESSED have been renamed to GKB_INPUT_READY and KBD_INPUT_READY respectively.
  • In unicode.s7i the functions striToUtf8(), utf8ToStri(), striToUtf16be(), utf16beToStri, striToUtf16le, utf16leToStri and utf7ToStri() are deprecated now. The functions toUtf8(), fromUtf8(), toUtf16Be(), fromUtf16Be(), toUtf16Le(), fromUtf16Le() and fromUtf7() should be used instead.
  • The files ar.s7i, cgi.s7i, cgidialog.s7i, charsets.s7i, cpio.s7i, csv.s7i, ftp.s7i, ftpserv.s7i, gethttp.s7i, httpserv.s7i, rpm.s7i, tar.s7i, zip.s7i, chkstr.sd7, ide7.sd7 s7c.sd7, comp/debug.s7i and comp/expr_util.s7i have been altered to use the new functions instead of the deprecated function.
  • The exception CLOSE_ERROR has been renamed to GRAPHIC_ERROR.
  • The graphic drivers have been changed to raise GRAPHIC_ERROR instead of FILE_ERROR.
  • The C macro SUPPORTS_PARTIAL_LINKING has been renamed to LINKER_OPT_PARTIAL_LINKING in chkccomp.c and several makefiles.
  • The functions checkPartialLinking() and determinePartialLinking() have been added to chkccomp.c. These functions determine if partial linking is actually working.
  • Documentation comments have been improved in keybd.s7i, unicode.s7i, drwlib.c and kbdlib.c.
  • In several files phrases like "illegal encoding" and "illegal file names" have been replaced with "invalid encoding" and "invalid file names".... read more
Posted by Thomas Mertes 2022-07-24

New Seed7 Release 2022-06-26

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • Syntax highlighting for the Nano editor has been added. Many thanks to Duke Normandin for creating seed7.nanorc.
  • The syntax highlighting of vim (in seed7.vim) has been improved.
  • The file syntaxhl.sd7 has been improved.
  • Explanations about type inference, return type overloading and integer overflow have been improved in the FAQ.
  • In the manual the tutorial chapter "For loop and containers" has been improved. The chapter about errors has been improved also.
  • The documentation in src/read_me.txt has been improved and the new file src/read_me.htm has been introduced.
  • The interpreter (s7) has been improved to write the error message with the correct line if a declaration fails (changes have been done in dcllib.c and error.c).
  • The new library pem.s7i has been added. This library supports the PEM cryptographic file format.
  • In encoding.s7i the function fromBase64 has been improved to check that no = is in the middle of a base64 string.
  • The library zstd.s7i has been fixed to work correct if the ID field size of the dictionary is 0.
  • The Seed7 compiler (s7c) has been improved to support warning levels.
  • The compiler has been improved to support case statements if the C switch statement does not work for int64Type (in prc_act.s7i).
  • In the compiler the string concatenation optimizations have been improved (in str_act.s7i).
  • Tests for string concatenation have been added to chkstr.sd7.
  • Checks for converting float expressions to bin32 and bin64 have been added to chkbin.sd7.
  • The support for the function log1p has been improved (in flt_rtl.c, flt_rtl.h and flt_act.s7i).
  • In the library asn1.s7i the function printAsn1 has been improved.
  • The usage of the GMP library has been disabled by default. It turned out that database connection libraries used GnuTLS which used GMP with a custom memory allocator. This caused a memory corruption. All makefiles now define USE_GMP as 0.
  • The program chkccomp.c has been improved to:
    • Determine the C language version supported by the compiler.
    • Determine C overflow behavior of int division.
  • The handling of integer division overflow has been fixed to avoid a MinGW gcc bug that triggers an endless loop.
  • Several types in database drivers have been renamed to avoid violating the C++ One Definition Rule (in sql_cli.c, sql_db2.c, sql_fire.c, sql_ifx.c, sql_lite.c, sql_my.c, sql_oci.c, sql_post.c, sql_srv.c and sql_tds.c).
  • Adjustments have be done in s7c.sd7 and comp/str_act.s7i to support compilation with a C++ compiler.
  • In common.h the macro logErrorIfTrueX has been introduced.
  • Function logging has been added to big_gmp.c, kbd_inf.c and kbd_poll.c.
  • Errors in function logging have been fixed in arr_rtl.c, big_rtl.c, drw_x11.c and sql_rtl.c.
  • Definitions of LOG1P_FUNCTION_OKAY, INT_DIV_OVERFLOW and INT_REM_OVERFLOW have been added to cc_conf.s7i. The definition of HAS_LOG1P has been removed. The file cmd_rtl.c and the program confval.sd7 have been adjusted.
  • Documentation comments have been updated in array.s7i, bin32.s7i, bin64.s7i, cc_conf.s7i, external_file.s7i, file.s7i, hash.s7i, math.s7i and flt_rtl.c.... read more
Posted by Thomas Mertes 2022-06-26

New Seed7 Release 2022-05-22

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • An explanation for Seed7 syntax highlighting has been added to the FAQ.
  • Syntax highlighting for vim and UltraEdit has been fixed in the files doc/sd7.vim, doc/seed7.vim and doc/seed7.uew.
  • Syntax highlighting support for notepad++ has been added with the file doc/seed7udl.xml
  • The file syntaxhl.sd7 has been added. It can be used to test Seed7 syntax highlighting.
  • In the string.s7i library, the functions lower() and upper() now use an up to date Unicode definition.
  • The library gzip.s7i has been refactored to use the new type gzipHeader and to avoid calling getUInt16Le().
  • The function getDigestOidFromAlgorithm() has been added to the library x509cert.s7i.
  • The pac.sd7 example program has been refactored. Now it also works when compiled.
  • The calc7 example program has been improved to support functions from the draw.s7i library.
  • Tests for array append ( &:= ), the 'times' operator and the function remove() have been added to chkarr.sd7.
  • Tests in chkovf.sd7 have been refactored.
  • Tests for Unicode case conversions and for conversions to UTF-8 have been added to chkstr.sd7.
  • Errors in getGidFromGroup() and getUidFromUser() have been fixed in the file cmd_unx.c.
  • In literal.c the error message for empty char literals has been improved.
  • The number of C compiler warnings has been reduced in sql_oci.c, drw_win.c and int_rtl.c.
  • In drw_drv.h, drw_dos.c, drw_emc.c, drw_win.c, drw_x11.c, s7.c, s7c.sd7 and comp/drw_act.s7i, the graphics support has been changed to call drawInit() at program start.
  • The function drawInit() has been added to drw_dos.c and drw_emc.c.
  • With these changes in the graphics support, an explicit initialization of graphics is no longer necessary. The explicit graphics initialization has been removed from bmp.s7i, gif.s7i, ico.s7i, jpeg.s7i, png.s7i, ppm.s7i and tiff.s7i.
  • In str_rtl.c the functions toLower() and toUpper() have been improved to use an up to date Unicode definition.
  • In drw_x11.c the exception checks in the function drwText have been improved.
  • In src/read_me.txt the explanation for how to compile under Windows with cl from MSVC has been improved.
  • In sql_fire.c the function setupParameters() has been changed to check wether malloc() returns NULL.
  • In sql_ifx.c the function createConnectionString has been changed to optionally consider the DB_LOCALE. Now, the function opening the Informix DB will try to do so with and without DB_LOCALE.
  • The compiler (s7c.sd7) has been changed to use stderr for a trace of functions (option: -tf).
  • The compiler has been improved to support tracing of dynamic calls (option: -td). This tracing is also written to stderr.
  • The compiler has been changed to raise ACTION_ERROR if a dynamic call would result in an endless recursion.
  • The program chkccomp.c has been improved to restart tests if no numeric result could be obtained. This is necessary for the program to work reliable under Windows with certain virus detection software.
  • Documentation comments have been improved in color.s7i.... read more
Posted by Thomas Mertes 2022-05-22

New Seed7 Release 2022-04-10

A new version of the extensible programming language Seed7, has been released.
See: http://seed7.sourceforge.net

Changelog:

  • In time.s7i, the function time(string) has been improved to consider the daylight saving time. Many thanks to Anders Carstensen for pointing out the problem and for providing a test program.
  • Explanations of the times operator and the functions bytes(), bytes2Int(), bytes2BigInt(), expm1(), log1p(), ignore() and openServerTls() have been added to the manual.
  • In the manual, the chapters about primitive actions and about the foreign function interface have been improved.
  • The FAQ and manual have been improved to consider the Informix database.
  • In ccittfax.s7i, the CCITT fax decoding has been improved.
  • In tiff.s7i, reading of TIFF files has been improved. Now, the requested length of Lempel Ziv Welch compressed data is computed correctly.
  • In jpeg.s7i, reading of JPEG files has been improved to use the component ID. Now, a hash from component ID to component type is used. The old code assumed that component ID and component type would be equal, and it raised RANGE_ERROR when this was not the case.
  • In bitdata.s7i, the performance of the functions getBit() and getBits() with a msbBitStream has been improved.
  • In array.s7i, the times operator has been improved to work with [A len L] times element.
  • A definition of the [A len L] operator has been added to syntax.s7i.
  • In x509cert.s7i reading and validating certificates has been improved. Now, there is partial support for PKCS #7 certificates.
  • The libraries tls.s7i and showtls.s7i have been improved to support TLS certificate_request, client_certificate and certificate_verify messages.
  • The compiler (s7c.sd7) has been improved to write better error messages for duplicate when values.
  • The program gkbd.sd7 has been improved to consider the space key.
  • In ref_data.c the function refArrToList() has been improved to raise RANGE_ERROR for an illegal array value.
  • In dcllib.c the function dcl_elements() has been improved to work correctly when push_stack() is a noop.
  • The files sql_fire.c and sql_tds.c have been improved to reduce C compiler warnings.
  • The program chkccomp.c has been improved to allow build tests to deliver a result after a delay.
  • In soc_rtl.c the functions socGets() and receive_and_alloc_stri() have been improved to set the EOF indicator instead of raising FILE_ERROR if the peer has crashed.
  • In soc_rtl.c, the function logError() will now be called if recv() fails.
  • In chkccomp.c, the function determineInformixDefines has been improved to avoid the definition of an empty C array.
  • The makefile mk_msvc.mak has been changed to define LIMITED_CSTRI_LITERAL_LEN. This avoids that the C compiler runs out of heap space.
  • Documentation comments have been updated in graph.s7i, tls.s7i, x509cert.s7i, ar.s7i, cpio.s7i, rpm.s7i, tar.s7i and zip.s7i.... read more
Posted by Thomas Mertes 2022-04-10