Menu

Seed7 / News: Recent posts

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

New Seed7 Release 2022-03-12

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

Changelog:

  • Two typos in the fwd_x11.c have been fixed. Thanks to Zachary Menzies for pointing them out.
  • Interpreter and compiler have been improved to support Informix databases.
  • The example program portfwd7.sd7 has been added. Portfwd7 is a port forwarder to redirect network communication.
  • The run-time to write a BMP file has been reduced to 74% (measured with gcc and valgrind).
  • The error messages for "Match failed" and "Variable expected" errors have been shortened.
  • The program gkbd.sd7 has been improved to show when mouse buttons are pressed.
  • The browser interface in browser.s7i has been improved to support Chromium and Edge.
  • In http_response.s7i, the HTTP response has been improved to support JPEG, ICO and TIFF files.
  • The pv7 picture viewer has been improved to use the path of the image.
  • The function hasImageExtension() has been move from pv7.sd7 to the imagefile.s7i library.
  • The example program findchar.sd7 has been improved to support Windows/DOS paths.
  • The support for primitive actions in the compiler has been improved.
  • The function loadBaseDlls() has been added to sql_post.c.
  • In tls.s7i an error in processing change_cipher_spec has been fixed.
  • The program chkbig.sd7 has been refactored to use smaller functions.
  • An additional test for case statements has been added to chkprc.sd7.
  • The function getPixelArray() has been added to draw.s7i.
  • The function setPointerPos() has been added to graph.s7i.
  • The libraries bmp.s7i, ico.s7i and ppm.s7i have been improved to use the function getPixelArray() to write BMP, ICO and PPM images.
  • In the libraries bmp.s7i, gif.s7i, jpeg.s7i, png.s7i, ppm.s7i and tiff.s7i calls of imagePixmap() have been replaced by calls of getPixmap().
  • The undocumented functions imagePixmap() and getImage() have been renamed to getPixmap() and getPixelData() respectively.
  • The compiler (s7c) has been improved to inline the action DRAW_PIXEL_TO_RGB.
  • The makefiles have been improved to simplify the build system. Now utilies like chkccomp, wrdepend, setwpath and sudo are compiled with extra commands. Support for Informix databases has also been added.
  • Several improvements have been made in chkccomp.c:
    • It now writes more detailed error messages.
    • The function appendOption() has been improved to check if an option is already an element in the list.
    • The functions fileIsPresentPossiblyAfterDelay(), runTest(), doTestNoResultCheck(), addDynamicLibToDllListWithRpath(), addDynamicLib(), addDynamicLibsWithRpath() and determineInformixDefines() have been added.
    • Now the macros ODBC_SIZEOF_SQLWCHAR, DB2_SIZEOF_SQLWCHAR and INFORMIX_SIZEOF_SQLWCHAR, SQL_SERVER_SIZEOF_SQLWCHAR are written into version.h.
    • Macros to support Informix databases are written into version.h.
  • In sql_base.c the error message concerning the searching for dynamic libraries has been improved.
  • Now the static functions hasDataType() and dataTypeIsUnsigned() in sql_cli.c are only defined when needed.
  • In all C source files, the types wcharType and wstriType have been replaced by utf16charType and utf16striType respectively. This avoids confusion, since sizeof(wchar_t) is 2 in Windows and 4 in Linux/Unix/BSD (although sizeof(wcharType) was always 2).
  • Definitions of utf32charType and utf32striType have been added to common.h.
  • Explanations of utf16charType, utf16striType, utf32charType and utf32striType have been added to the manual.
  • In heaputl.h, the macros SIZ_WSTRI, MAX_WSTRI_LEN and ALLOC_WSTRI have been removed. Definitions of the macros SIZ_UTF16, SIZ_UTF32, MAX_UTF16_LEN, MAX_UTF32_LEN, ALLOC_UTF16, ALLOC_UTF32, REALLOC_UTF16, REALLOC_UTF32, UNALLOC_UTF16 and UNALLOC_UTF32 have been added.
  • The database drivers sql_cli.c sql_db2.c, sql_odbc.c and sql_srv.c have been changed to use SQLWCHAR instead of wcharType and wstriType.
  • In sql_cli.c the macros SIZ_SQLWSTRI, MAX_SQLWSTRI_LEN, ALLOC_SQLWSTRI, UNALLOC_SQLWSTRI, stri_to_sqlwstri, sqlwstri_to_stri and copy_to_sqlwstri have been introduced. These macros allow the DB interface to work for sizeof(SQLWCHAR) == 2 and sizeof(SQLWCHAR) == 4.
  • The Informix database driver sql_ifx.c has been added.
  • The macro BIGINT_LIB has been renamed to BIGINT_LIBRARY in chkccomp.c, common.h, big_gmp.c, big_rtl.c, flistutl.c and heaputl.h.
  • Documentation comments have been improved in bmp.s7i, ccittfax.s7i, draw.s7i, hmac.s7i, huffman.s7i, ico.s7i, imagefile.s7i, lzw.s7i, ppm.s7i,
  • In sql_base.s7i, the value DB_INFORMIX has been added to the enumeration type dbCategory.
  • Functions to open Informix databases have been added to sql_base.s7i and sqllib.c.
  • The function quoteTableNames() has been added to sql_base.s7i.
  • The program db7.sd7 has been improved to quote table names depending on the database type.
  • The function drwPFArc() has been added to drw_dos.c and drw_emc.c.
  • The program wrdepend.c has been improved to support INFORMIX_INCLUDE_OPTION.
  • The function XWarpPointer() has been added to fwd_x11.c and x11_x.h.
  • Interpreter and compiler have been improved to support the actions DRW_GET_PIXEL_ARRAY, DRW_SET_POINTER_POS and SQL_OPEN_INFORMIX.
  • The actions DRW_IMAGE, DRW_GETIMAGE and DRW_GET have been renamed to DRW_GET_PIXMAP_FROM_PIXELS, DRW_GET_PIXEL_DATA and DRW_GET_PIXMAP respectively.
  • Action and function names have been refactored to fit to each other. The actions DRW_CONVPOINTLIST, DRW_FPOLYLINE, DRW_GENPOINTLIST, DRW_GETIMAGEPIXEL, DRW_GETPIXEL, DRW_PIXELTORGB, DRW_POLYLINE, DRW_SETCLOSEACTION, DRW_SETCONTENT, DRW_SETCURSORVISIBLE, DRW_SETPOS, DRW_SETTRANSPARENTCOLOR, DRW_SETWINDOWNAME, DRW_TOBOTTOM and DRW_TOTOP have been renamed to DRW_CONV_POINT_LIST, DRW_FPOLY_LINE, DRW_GEN_POINT_LIST, DRW_GET_IMAGE_PIXEL, DRW_GET_PIXEL, DRW_PIXEL_TO_RGB, DRW_POLY_LINE, DRW_SET_CLOSE_ACTION, DRW_SET_CONTENT, DRW_SET_CURSOR_VISIBLE, DRW_SET_POS, DRW_SET_TRANSPARENT_COLOR, DRW_SET_WINDOW_NAME, DRW_TO_BOTTOM and DRW_TO_TOP respectively.
  • The file primitiv.c has been adjusted to use the new action names.
  • The files drwlib.c and drwlib.h have been refactored to use function names that correspond to action names.
  • In drw_rtl.c the functions memcpy_pixel() and drwRtlImage() have been renamed to memcpy_to_pixel() and drwGetPixmapFromPixels() respectively.
  • The functions memcpy_from_pixel() and drwGetPixelArray() have been added to drw_rtl.c.
  • In drw_win.c, the function rwGetImage() and drwGet() have been renamed to drwGetPixelData() and drwGetPixmap() respectively.
  • The function drwSetPointerPos() has been added to drw_win.c and drw_x11.c.
  • In error.c the new macro MAX_DEPTH_SHOWN defines the expression depth shown in "Match failed" and "Variable expected" error messages.
  • The functions stri_to_wstri16(), stri_to_wstri32(), wstri16_to_stri() and wstri32_to_stri() have been added to striutl.c.
  • The files comp/drw_act.s7i and comp/sql_act.s7i have been adjusted to support the new action names.... read more
Posted by Thomas Mertes 2022-03-12

New Seed7 Release 2022-01-30

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

Changelog:

  • An arc() function (to draw an arc) with a width (thickness) parameter has been added to the draw.s7i library. Many thanks to Zachary Menzies for pointing out that it was missing.
  • The new library tiff.s7i has been added. This library supports the TIFF image file format.
  • The new library ccittfax.s7i has been added. This library supports CCITT fax decoding as it is used in TIFF files.
  • The library zip.s7i has been improved to support reading zip64 archives.
  • A chapter about the type 'process' has been added to the manual. The chapter about case statements and other chapters of the manual have been improved as well.
  • Bit streams have been introduced and the huffman decoding has been improved. The run-time to extract a gzipped Seed7 archive with tar7 has been reduced to 46% (measured with gcc and valgrind). Other usages of the inflate algorithm (PNG, ZIP, etc.) also benefit from the improvements.
  • The compiler has been improved to:
    • Optimize overflow checks away for shift operations.
    • Optimize index checks for string operations.
    • Write an error message if an unsupported option is used.
    • Inline the string tail function.
    • Use parentheses to reduce C compiler warnings.
    • Improve optimizations of the bytes2Int() function.
    • Improve checking of division by zero.
  • The statistics of the Seed7 compiler (s7c.sd7) has been improved to count inlined functions, optimized index checks and optimized overflow checks.
  • In bitdata.s7i, the types bitStream, lsbBitStream and msbBitStream have been introduced. These types support the functions getBit(), getBits(), peekBits(), skipBits() and gets().
  • In bitdata.s7i, the functions openLsbBitStream() and openMsbBitStream() have been introduced to create lsbBitStream and msbBitStream values. With these functions, bit streams can be created with a file or a string as data source.
  • In bitdata.s7i the functions getBitLsb(), getBitsLsb(), peekBitsLsb(), skipBitsLsb(), getBitMsb(), getBitsMsb(), peekBitsMsb() and skipBitsMsb() with string als parameters are deprecated now. The functions with the types lsbBitStream and msbBitStream should be used instead.
  • In huffman.s7i the functions getHuffmanSymbolMsb(string, ...) and getHuffmanSymbolLsb(string, ...) are deprecated. The functions getHuffmanSymbol(msbBitStream, ...) and getHuffmanSymbol(lsbBitStream, ...) should be used instead.
  • Tests for getBit(), getBits(), peekBits(), skipBits() and gets() have been added to chkbitdata.sd7. This refers to tests with lsbBitStream and msbBitStream.
  • The program chk_all.sd7 has been adjusted to the changes in chkbitdata.sd7.
  • The functions in inflate.s7i have been improved to use lsbBitStream as parameter instead of the previous combination of string, bytePos and bitPos.
  • The library inflatefile.s7i has been removed. The functions from inflate.s7i can be used instead.
  • The library cpio.s7i has been improved to check if a CPIO header is the correct size.
  • The library bytedata.s7i has been improved to raise RANGE_ERROR if an empty byte string is converted to integer or bigInteger.
  • The library gzip.s7i has been improved to use lsbBitStream and the new functions from inflate.s7i.
  • The library imagefile.s7i has been improved to support TIFF images.
  • The library jpeg.s7i has been improved to use getHuffmanSymbol(msbBitStream) instead of getHuffmanSymbolMsb(stri, bytePos, bitPos, ...).
  • The library lzw.s7i has been improved to support the functions lzwDecompress(lsbBitStream, ...), lzwDecompress(msbBitStream, ...), lzwDecompressEarlyChange(msbBitStream, codeSize), lzwDecompressEarlyChange(msbBitStream, codeSize, requestedLength) and lzwDecompressMsbEarlyChange(string, codeSize, requestedLength).
  • The files bitdata.s7i, gzip.s7i, inflate.s7i, jpeg.s7i, zstd.s7i and chkbitdata.sd7 have been refactored to avoid 'bitStream' as variable name. The name 'bitStream' is now used as interface type in bitdata.s7i.
  • The Seed7 compiler has been improved in comp/arr_act.s7i, comp/bin_act.s7i, comp/bst_act.s7i, comp/const.s7i, comp/flt_act.s7i, comp/int_act.s7i, comp/intrange.s7i, comp/literal.s7i, comp/prc_act.s7i, comp/rfl_act.s7i, comp/set_act.s7i, comp/stat.s7i, comp/str_act.s7i and s7c.sd7.
  • Checks for bytes(), bytes2Int(), the right shift operator and division by zero have been added to chkint.sd7.
  • Checks for bin64 shift operations have been added to chkbin.sd7.
  • Checks for index access to an empty array have been added to chkarr.sd7.
  • Checks for bytes2BigInt() have been added to chkbig.sd7.
  • In array.s7i the declaration of the times operator has been simplified.
  • The program pv7.sd7 has been improved to support TIFF files.
  • Casts have been added to dll_win.c and libpath.c to reduce C compiler warnings.
  • In error.c the error message for a failed declaration has been improved.
  • In str_rtl.c the performance of strHeadSlice() has been improved.
  • Unused variables have been removed in several files of the compiler.
  • In int_rtl.c the functions intBytesBe2Int(), intBytesBe2UInt(), intBytesLe2Int() and intBytesLe2UInt() have been changed to raise RANGE_ERROR if the string is empty.
  • In big_rtl.c and big_gmp.c the functions bigFromByteBufferBe() and bigFromByteBufferLe() have been changed to raise RANGE_ERROR if the size is zero (the buffer is empty).
  • The files drw_win.c, drw_x11.c, drw_drv.h, drwlib.c, drwlib.h and primitiv.c have been changed to support the action DRW_PFARC.
  • Definitions for the function XSetLineAttributes() have been added to fwd_x11.c and x11_x.h.
  • In the program chkccomp.c the detection of the division by zero behavior and the remainder by zero behavior has been improved.
  • Documentation comments have been improved in bstring.s7i, bytedata.s7i, bitdata.s7i, null_file.s7i, process.s7i, strifile.s7i and biglib.c.... read more
Posted by Thomas Mertes 2022-01-30

New Seed7 Release 2021-12-25

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

Changelog:

  • Support for syntax highlighting in vim has been added. Many thanks to Johannes Gritsch for providing the files doc/seed7.vim and doc/sd7.vim.
  • Chapters about ignoring values, bin64, bin32, bstring, fileSys, Transport Layer Security and the graphics library have been added to the manual. Many other chapters of the manual have been improved as well.
  • The new library imagefile.s7i has been added. This library supports various image file formats (PNG, GIF, JPEG, BMP, ICO, PPM).
  • The picture viewer program pv7.sd7 has been improved to use the function readImage() from the imagefile.s7i library.
  • The keyboard test program gkbd.sd7 has been improved to show more keys. These keys turn red when they are currently pressed.
  • The function equalFileContent() in sydir7.sd7 has been improved to use a reduced buffer size. A possible error that happens if just one file is at EOF after reading data into the buffers, has been fixed also.
  • In keybd.s7i, keydescr.s7i and kbd_drv.h definitions for KEY_CTL_0 to KEY_CTL_9 have been added.
  • In png.s7i an error that happend when reading tiny interlaced PNG files has been fixed.
  • In boolean.s7i the functions succ(), pred() and boolean() (conversion from integer) have been improved to raise RANGE_ERROR if the resulting value would not be TRUE or FALSE.
  • Tests for the boolean succ() and pred() functions have been added to chkbool.sd7.
  • Tests for boolean for-loops have been added to chkprc.sd7.
  • The operator -:= has been added to bitset.s7i, bitsetof.s7i and hashsetof.s7i.
  • Tests for set difference assignment (operator -:=) have been added to chkset.sd7.
  • The program chk_all.sd7 has been adjusted to the changes in the check programs.
  • The function width(aCharacter) (defined in char.s7i) has been fixed to return 0 for curser and function keys. The change has been made in chr_rtl.c.
  • In file.s7i the function skip() has been improved to avoid a possible endless loop.
  • In null_file.s7i the function gets() has been improved to raise RANGE_ERROR if the parameter ''maxLength'' is negative.
  • In graph_file.s7i, pixmap_file.s7i and window.s7i, the scrolling has been fixed.
  • In bytedata.s7i the functions getUInt16Le(), getUInt32Le(), getUInt16Be() and getUInt32Be() have been improved to use bytes2Int().
  • In filesys.s7i and osfiles.s7i the function readlink() is deprecated. The function readLink() should be used instead. The files cpio.s7i ftpserv.s7i, rpm.s7i, tar.s7i, find7.sd7 and sydir7.sd7 have been altered to use readLink().
  • In graph.s7i fhe function DRAW_FLUSH() is deprecated. The function flushGraphic() should be used instead.
  • The files dialog.s7i, graph_file.s7i, pixmap_file.s7i, bas7.sd7, bifurk.sd7, carddemo.sd7, castle.sd7, cellauto.sd7, clock3.sd7, dnafight.sd7, gkbd.sd7, klondike.sd7, lander.sd7, mahjong.sd7, mandelbr.sd7, mirror.sd7, pairs.sd7, panic.sd7, percolation.sd7, pv7.sd7, raytrace.sd7, shisen.sd7, sudoku7.sd7 and tetg.sd7 have been altered to use flushGraphic() instead of the deprecated DRAW_FLUSH().
  • In draw.s7i the put() functions with PSET and XOR parameter are deprecated. The functions without PSET respectively XOR should be used instead.
  • In graph.s7i the function setCloseAction() is deprecated. Instead of setCloseAction(popupWindow, RETURN_KEY); the statement selectInput(popupWindow, KEY_CLOSE, TRUE); should be used.
  • The files dialog.s7i, castle.sd7, klondike.sd7, lander.sd7, mahjong.sd7, mandelbr.sd7, pairs.sd7, panic.sd7, planets.sd7, shisen.sd7, sokoban.sd7, sudoku7.sd7, tetg.sd7 and wator.sd7 have been altered to use selectInput() instead of the deprecated setCloseAction().
  • In gzip.s7i the functions openGunzipFile(aFile) and openGzipFile(aFile) are deprecated. Instead of openGunzipFile(aFile), use openGzipFile(aFile, READ), and instead of openGzipFile(aFile) use openGzipFile(aFile, WRITE). The files rpm.s7i and tar_cmds.s7i have been altered to use the new function.
  • In strifile.s7i the function openStrifile() is deprecated. The function openStriFile() should be used instead.
  • The files htmldom.s7i, rpm.s7i, xmldom.s7i and chkbitdata.sd7 have been altered to use openStriFile() instead of the deprecated openStrifile().
  • In stritext.s7i the function openStritext() is deprecated. The function openStriText() should be used instead.
  • A syntax error in the library stritext.s7i has been fixed.
  • In echo.s7i, dir.s7i, pixmap_file.s7i and shell.s7i internal indentifiers have been renamed to use camel case.
  • Interpreter and compiler have been improved to support the actions BLN_SUCC and BLN_PRED. Changes have been done in boolean.s7i, blnlib.c, blnlib.h, primitiv.c, comp/bln_act.s7i and comp/action.s7i.
  • Interpreter and compiler have been improved to support the action SET_DIFF_ASSIGN. Changes have been done in bitset.s7i, bitsetof.s7i, set_rtl.c, set_rtl.h, setlib.c, setlib.h, primitiv.c, comp/set_act.s7i and comp/action.s7i.
  • In interpreter and compiler the actions BLN_ICONV1 and BLN_ICONV3 have been improved to raise RANGE_ERROR if the value is not 0 or 1.
  • The interpreter has been improved (in s7.c) to write an error message if the declaration of main() is missing.
  • The graphic keyboard drivers in drw_win.c, gkb_win.c and gkb_x11.c have been improved. Minimizing, maximizing and restoring a window triggers a KEY_RESIZE only when it is necessary. Now it can be checked if the mouse forward and back buttons are currently pressed. The event tracing in the keyboard drivers has also been improved.
  • The parameters of the function drwPut() have been altered in drw_dos.c, drw_emc.c, drw_win.c, drw_x11.c, drw_drv.h, drwlib.c and comp/drw_act.s7i.
  • The code generation for ENU_ICONV2 in the compiler has been improved (in comp/enu_act.s7i). Now it is similar to the code generated for BLN_ICONV1 and BLN_ICONV3.
  • The error logging in exec.c has been improved.
  • Several makefiles have been improved such that 'sudo make install' succeeds for an existing installation.
  • In blnlib.c the functions bln_pred() and bln_succ() have been added and the functions bln_iconv1() and bln_iconv3() have been adjusted. Now these functions raise RANGE_ERROR if the resulting value would not be TRUE or FALSE.
  • The function setDiffAssign() has been added to set_rtl.c.
  • In tim_win.c the function alternate_utime() has been improved to work more reliable (this is called by setMTime).
  • The function cmdReadlink has been renamed to cmdReadLink. Changes have been done in cmdlib.c, cmd_rtl.c, cmd_rtl.h and comp/cmd_act.s7i.
  • Documentation comments have been added or improved in array.s7i, bigint.s7i, bin32.s7i, bin64.s7i, bitset.s7i, bitsetof.s7i, bmp.s7i, boolean.s7i, bstring.s7i, category.s7i, char.s7i, cpio.s7i, dir.s7i, draw.s7i, echo.s7i, file.s7i, filesys.s7i, float.s7i, forloop.s7i, gif.s7i, graph.s7i, graph_file.s7i, gzip.s7i, hashsetof.s7i, ico.s7i, integer.s7i, jpeg.s7i, keydescr.s7i, line.s7i, logfile.s7i, lzma.s7i, null_file.s7i, pixmap_file.s7i, png.s7i, ppm.s7i, progs.s7i, reference.s7i, ref_list.s7i, rpm.s7i, shell.s7i, stars.s7i, strifile.s7i, string.s7i, stritext.s7i, subfile.s7i, tar.s7i, text.s7i, tls.s7i, utf16.s7i, utf8.s7i, xz.s7i, zstd.s7i setlib.c and set_rtl.c.... read more
Posted by Thomas Mertes 2021-12-25

New Seed7 Release 2021-11-14

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

Changelog:

  • The libraries pixmap_file.s7i and graph_file.s7i have been improved to draw to the correct graphic window. Many thanks to Anders Carstensen for pointing out that text was written into the wrong window and for providing a test program.
  • Answers to three new questions have been added to the FAQ. Answers to existing questions have been improved. Many thanks to Zachary Menzies for pointing out a problem with two dimensional arrays and for providing a test program.
  • An unclosed <i> tag has been removed from the manual. Thanks to ifethereal for pointing out this error. Several other places with illegal HTML in doc/manual.htm have also been fixed.
  • The function getXmlTagHeadOrContent() has been improved in scanfile.s7i and scanstri.s7i. Now, tag names start with a letter or underscore (_), and the function can read XML contents that start with the character '<' (like < <= or <> ). In this case, the character < is read as character reference (&lt;).
  • An explanation of the exception declaration has been added to the manual.
  • The search for the X11 Xrender extension has been improved. In chkccomp.c the function determineX11Defines() has been improved. Declarations have been moved from x11_x.h to the new file x11_rend.h. Adjustements have been made in drw_x11.c and fwd_x11.c.
  • Two code pages for APL symbol encoding have been added to charsets.s7i. The graphic representation of the character '\a' (bell) has been changed from '\16#25cf;' to '\16#2022;' in all code sets.
  • In the vector font cronos16 the design of the characters 'J' '£' and '€' have been improved.
  • In the vector font cronos27 the design of the characters '£' '¤' and '€' have been improved.
  • In analyze.c, the function analyzeProg() has been improved to work correctly if an error occurs.
  • In itflib.c, the function itf_create() has been improved to raise the exception ACTION_ERROR if the source struct is NULL.
  • The prototypes of the functions conWrite() and stri_to_bstriw() have been changed to work with constant strings.... read more
Posted by Thomas Mertes 2021-11-15

New Seed7 Release 2021-10-09

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

Changelog:

  • Seed7's approach to avoid double library includes has been improved. Many thanks to Zachary Menzies for reporting the problem (a second library with the same name but in a different directory was not included) and for providing a test case to trigger it. The new mechanism uses the absolute path of a library to determine if it already has been included. Now the map of included libraries is not part of the compiled executable anymore. Changes have been made in seed7_05.s7i, analyze.c, data.h, infile.c, infile.h, libpath.c, libpath.h, prclib.c and prg_comp.c.
  • The new library htmldom.s7i has been added. This library contains an improved HTML DOM parser. Many thanks to OddCitron1981 for suggesting to parse some of the wild HTML out there on the web. The functions readHtmlNode() and readHtml() have been moved from xmldom.s7i to htmldom.s7i. The type htmlDocument and the function readHtmlContainerSubNodes() have been added. Improvements of HTML scanning functions were also made due to this suggestion. The new HTML parser considers several things special for HTML:
    • Tag names and attribute names are converted to lower case.
    • There are alternate end tags for tags with optional closing tag.
    • Attributes without value get "" as value.
    • The <!DOCTYPE data is not handled as xmlNode.
    • Closing tags without opening tag are left in as is.
  • The HTML scanning functions in scanfile.s7i and scanstri.s7i have been improved:
    • HTML tag attributes without value are allowed now.
    • Reading of HTML tag attributes now stops at the end of tag character (>).
    • CDATA sections are considered now.
    • The functions getXmlTagHeadOrContent(), getSymbolInXmlTag(), getHtmlAttributeValue() and getNextHtmlAttribute() have been improved.
    • The function getXmlCdataContent() has been added.
  • A chapter about for-until-loops has been added to the manual.
  • The makefiles and the compiler (s7c.sd7) have been improved to avoid linking unused system libraries (e.g. with -lm). Changes have been done in cc_conf.s7i, comp/action.s7i, comp/flt_act.s7i, comp/library.s7i, s7c.sd7, cmd_rtl.c and in the makefiles.
  • The bas7.sd7 (basic interpreter) example program has been improved.
    • Now, it is possible to do a string multiplication with the * operator. E.g.: "ha"3 results in "hahaha" and "ab"2+"xy"*3 results in "ababxyxyxy".
    • Now, the RPT$ function is checked for a negative factor.
  • The wiz.sd7 example program has been refactored. The functions treasureNumber() and vendorDies() have been introduced.
  • The bigfiles.sd7 example program has been improved to limit the length of the result list.
  • The compiler has been improved:
    • Now, unused system libraries are not linked to the executable.
    • In comp/flt_act.s7i the implementation of FLT_DECOMPOSE has been improved and float comparisons set the flag mathLibraryUsed, if the implementation requires it.
    • Two functions named appendLibrary() have been added to s7c.sd7. These functions avoid that a system library is linked twice.
    • In comp/action.s7i calls of BIG_... actions now set the flag bigintLibraryUsed and calls of FLT_... actions (that need the math system library) now set the flag mathLibraryUsed.
    • The flags bigintLibraryUsed and mathLibraryUsed have been added to comp/library.s7i.
  • In xmldom.s7i the writeXml functions have been refactored. Unnecessary definitions of writeXml have been removed.
  • Definitions of SYSTEM_BIGINT_LIBS and SYSTEM_MATH_LIBS have been added to cc_conf.s7i. The definition of ADDITIONAL_SYSTEM_LIBS has been removed. SYSTEM_BIGINT_LIBS and SYSTEM_MATH_LIBS are used in confval.sd7 and s7c.sd7.
  • Several improvements in chkccomp.c have been done:
    • Now SYSTEM_MATH_LIBS and LINKER_OPT_DYN_LINK_LIBS are considered. This helps to avoid linking unused libraries.
    • ADDITIONAL_SYSTEM_LIBS has been renamed to SYSTEM_BIGINT_LIBS.
    • Now, it checks if fileno() succeeds after a successful call of popen() (this fixes a problem with Emscripten).
    • The function appendOption() has been improved.
    • The type of several indices has been changed from int to unsigned int (this reduces the number of C warnings).
    • The value LINKER_OPT_DYN_LINK_LIBS is now added to a corresponding list of system libraries if dynamic linking at run-time is necessary.
  • In cmd_rtl.c the function doReadLink() has been improved to work also for symlinks in the Linux /proc filesystem (in /proc the stat() function reports a symlink size of 0).
  • The macro environmenStrncmp has been renamed to environmentStrncmp.
  • The function getProgramPath() has been moved from analyze.c to cmd_rtl.c. Additionally it has been improved and renamed to getAbsolutePath().
  • In cmd_unx.c the function getExecutablePath() has been improved to use doReadLink() and to return a straightened absolute path (the special directories "." and ".." are interpreted according to their conventional meanings).
  • The functions concatAndStraightenPath() and straightenAbsolutePath() have been added to str_rtl.c.
  • In infile.c the functions open_infile(), close_infile(), open_string() and remove_prog_files() have been renamed to openInfile(), closeInfile(), openString() and removeProgFiles() respectively. Now openInfile() and openString() return a boolType result to indicate the success.
  • In libpath.c the functions find_include_file(), append_to_lib_path(), init_lib_path() and free_lib_path() have been renamed to findIncludeFile(), appendToLibPath(), initLibPath() and freeLibPath() respectively. The functions initIncludeFileHash(), shutIncludeFileHash() and openIncludeFile() have been added. The added functions maintain a hashmap of already included files.
  • In prclib.c the function prc_include() has been adjusted to call the new function that avoids double includes. Now the 2nd parameter of the action PRC_INCLUDE contains the file name to be included.
  • In striutl.c the functions stri_to_os_utf8(), conv_to_os_stri() have been improved to return a boolType result that indicates success.
  • Logging functions have been added to strlib.c.
  • Documentation comments have been improved in cc_conf.s7i, html.s7i, osfiles.s7i, scanfile.s7i, scanstri.s7i, cmdlib.c, cmd_rtl.c, hshlib.c and hsh_rtl.c.... read more
Posted by Thomas Mertes 2021-10-09

New Seed7 Release 2021-09-04

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

Changelog:

  • The linking of PostgreSQL has been improved. Many thanks go to SiliconWizard, for pointing out linking problems and for helping to investigate them. The function findPgTypeH() has been added to chkccomp.c. Now the search for pg_type.h and pg_type_d.h does not include postgres.h. In sql_post.c the include of the file postgres.h has been removed.
  • The wiz.sd7 example program has been refactored. Now it can be compiled. Many thanks go to Vasiliy Tereshkov, for reporting the compilation problem. Additionally, several improvements of wiz.sd7 have been done.
  • The functions expm1() and log1p() have been added to the math.s7i library. Many thanks go to Sanjay Jain for pointing out that they were missing.
  • In wrinum.s7i the functions str(ENGLISH, number) and str(GERMAN, number) have been improved to work correctly for zero.
  • In forloop.s7i the definition of for-until-loops has been improved, such that the loop variable never gets a value outside of the range. The definition of for-loops has been changed to invoke the loop-body just at one place. Since the loop body is inlined, this does shorten the generated code.
  • Tests for for-loops have been added to chkprc.sd7.
  • The compiler (s7c.sd7) has been improved to generate better code for the actions BLN_TERNARY, REF_ADDR, REF_SELECT and SET_ELEM (changes were done in bln_act.s7i, ref_act.s7i and set_act.s7i).
  • The compiler has been improved (in comp/enu_act.s7i), to check for a possible RANGE_ERROR, if an integer is converted to an enumeration value (action ENU_ICONV2).
  • The compiler has been improved to optimize expressions like ord(aBigExpression mod aPowerOfTwo).
  • The function chkBigOrdWithBigMod has been added to chkbig.sd7. This function checks the optimizations done with expressions like ord(aBigExpression mod aPowerOfTwo).
  • Tests for the ternary operator have been added to chkstr.sd7.
  • Tests for the 'element in bitset' operator have been added to chkset.sd7. These tests check the compiler optimizations for SET_ELEM.
  • Definitions of HAS_EXPM1 and HAS_LOG1P have been added to cc_conf.s7i.
  • Interpreter and compiler have been improved, to support the actions HAS_EXPM1 and HAS_LOG1P.
  • In comp/intrange.s7i the function getIntRange() has been improved to consider the actions INT_SUCC, INT_PRED, INT_ICONV1, INT_ICONV3 and SET_RAND. The handling of the actions INT_RAND, INT_ABS and INT_NEGATE has been improved. The functions getIntAddRange() and getSetRandRange() have been added.
  • The program chk_all.sd7 has been adjusted to the changes in the check programs.
  • A spelling error in s7c.sd7 has been fixed.
  • The program wrinum.sd7 has been changed to start with zero.
  • Logging functions have been added to reflib.c.... read more
Posted by Thomas Mertes 2021-09-04