Skip to content

Releases: ThomasMertes/seed7

Seed7_release_2024-11-18

18 Nov 16:58
Compare
Choose a tag to compare

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

Changelog:

  • A new Seed7 installer for Windows (seed7_05_20240812_win.exe) has been released. This installer correctly identifies if the Windows operating system is 32- or 64-bit. Many thanks to Bruce Axtens and Simon Dash for reporting errors caused by 32-bit Seed7 installations (running out of memory with bigfiles.sd7 and a failing test with chkarr.sd7).
  • In idxarray.s7i the type 'array [integer] baseType' has been mapped to 'array baseType'. Many thanks to Simon Dash for reporting that the use of 'array [integer] baseType' triggered errors.
  • In httpserv.s7i the function getHttpRequest() has been improved to assure that something can be read from the socket without waiting.
  • In fixarray.s7i fixed size arrays have been improved to support for-each-loops.
  • In bitdata.s7i, the types lsbOutBitStream and msbOutBitStream have been introduced. These types support the functions putBit(), putBits(), length(), truncate(), flush() and getBytes().
  • The function putBits(lsbOutBitStream) is 22% faster than the deprecated function putBitsLsb().
  • The function putBits(msbOutBitStream) is 24% faster than the deprecated function putBitsMsb().
  • Tests for lsbOutBitStream and msbOutBitStream have been added to chkbitdata.sd7. The tests check putBit(), putBits(), length() and truncate().
  • Tests have been added to chkbitdata.sd7. The tests check the addition of zero bit sequences to a bit stream.
  • The library lzw.s7i has been improved to use a lsbOutBitStream or a msbOutBitStream for the LZW compression.
  • In bitdata.s7i the types lsbBitStream and msbBitStream and the functions openLsbBitStream and openMsbBitStream are deprecated. The types lsbInBitStream and msbInBitStream and the functions openLsbInBitStream and openMsbInBitStream should be used instead.
  • Support for Huffman encoding has been added to the huffman.s7i library.
  • The libraries ccittfax.s7i, gzip.s7i, huffman.s7i, inflate.s7i, lzw.s7i and zstd.s7i have been changed to replace the deprecated type lsbBitStream with lsbInBitStream. The deprecated function openLsbBitStrea has been replaced with openLsbInBitStream as well.
  • The libraries ccittfax.s7i, huffman.s7i, jpeg.s7i, lzw.s7i and tiff.s7i have been changed to replace the deprecated type msbBitStream with msbInBitStream. The deprecated function openMsbBitStream has been replaced with openMsbInBitStream as well.
  • Support for the dynamic deflate compression has been added to the library deflate.s7i.
  • In deflate.s7i the functions putDistance and encodeLz77Distance have been refactored to use a case statement instead of an if-elsif-chain. This improves the performance of encodeLz77Distance by 30%.
  • The libraries deflate.s7i and gzip.s7i have been improved to use a lsbOutBitStream for the DEFLATE compression.
  • In inflate.s7i the function decodeDynamicHuffmanCodes() has been refactored.
  • In inflate.s7i and ccittfax.s7i the decoder names have been refactored.
  • In huffman.s7i, inflate.s7i and jpeg.s7i the functions createHuffmanTableMsb and createHuffmanTableLsb have been renamed to createMsbHuffmanDecoder respectively createLsbHuffmanDecoder.
  • In huffman.s7i, ccittfax.s7i, inflate.s7i and jpeg.s7i the undocumented types msbHuffmanTable and lsbHuffmanTable have been renamed to msbHuffmanDecoder respectively lsbHuffmanDecoder.
  • In ccittfax.s7i type, variable, parameter and function names have been refactored.
  • In bitdata.s7i the functions putBitLsb(), putBitsLsb(), putBitMsb() and putBitsMsb() with a string or file as parameter are deprecated. The functions with the types lsbOutBitStream and msbOutBitStream should be used instead.
  • The new library compress.s7i has been added. This library supports compression and decompression with PackBits (Tiff version and PDF version).
  • The library tiff.s7i has been improved to use the new function fromPackBits() instead of unpackBits(). The declaration of unpackBits() in tiff.s7i has been removed.
  • The declaration of the unused type tiffIDFEntry has been removed from tiff.s7i.
  • The functions toAsciiHex() and fromAsciiHex() have been added to the library encoding.s7i.
  • In encoding.s7i the function toAscii85() has been fixed to handle the last partial group correctly.
  • In encoding.s7i the function fromPercentEncoded() has been improved to scale better with the string length.
  • In encoding.s7i the function fromUrlEncoded has been changed to avoid a change of pos in a for-key-loop.
  • In lzw.s7i the LZW compressions have been fixed to write the end code with the correct number of bits. If necessary the clear code is written before the end code.
  • In gzip.s7i the function gzcompress() has been fixed to use the correct header.
  • The library deflate.s7i has been improved to use 'fixLen' instead of 'len' for the Lz77 compression in the function deflate().
  • In charsets.s7i support for PostScript Standard Encoding has been added.
  • In charsets.s7i the code page mac_os_roman has been fixed.
  • The library ico.s7i has been improved to support ICO files with a PNG image.
  • In pbm.s7i the reading of a PBM (portable bitmap) image files has been fixed to avoid an INDEX_ERROR if the image width is a multiple of 8.
  • In pbm.s7i, pgm.s7i and ppm.s7i functions to read image lines have been introduced. These functions use a 1D pixelArray instead of a 2D pixelImage array. This avoids array index checks in the innermost loop.
  • The function setPixels() has been added to the library pixelimage.s7i. This function uses a 1D pixelArray parameter.
  • The library ccittfax.s7i has been improved to use the function setPixels().
  • In ccittfax.s7i the functions processCcittFaxRow(), processCcittT4Fax2dRow() and processCcittT4Fax1dRow() have been improved to use the 1D array pixelArray instead of the 2D array pixelImage.
  • In ccittfax.s7i the fixed base array type ccittFaxValues has been introduced for A and B values.
  • The unused functions putBits0Msb, putBits1Msb and ccittFaxDecode have been removed from ccittfax.s7i.
  • In huffman.s7i and ccittfax.s7i the element maxBitWidth has been renamed to maximumCodeLength.
  • In huffman.s7i the function computeSymbolsWithCodeLength() has been introduced. This function is used by createLsbHuffmanDecoder(), reduceMaximumHuffmanCodeLength() and createHuffmanEncoder().
  • In huffman.s7i parameter and variable names have been refactored.
  • In zstd.s7i the type zstdHuffmanDecodingTable() has been renamed to zstdHuffmanDecoder(). Variables of this type have been renamed from 'table' to 'decoder'.
  • In hash.s7i documentation for the hash update function has been added.
  • Tests for the hash update function have been added to chkhsh.sd7.
  • In exif.s7i The function readExifData has been changed to be usable from png.s7i. The call of readExifData in jpeg.s7i has been adjusted.
  • The library png.s7i has been improved:
    • The Exif orientation is considered in PNG images.
    • Support for writing PNG images has been added.
    • The function computeBytesPerPixel uses a case-statement instead of an if-elsif-chain.
    • Constants for the PNG color type (PNG_COLOR_TYPE_GRAYSCALE, PNG_COLOR_TYPE_RGB, PNG_COLOR_TYPE_PALETTE, PNG_COLOR_TYPE_GRAYSCALE_ALPHA and PNG_COLOR_TYPE_RGB_ALPHA) have been introduced.
    • The functions fillPngImageLine1Bit(), fillPngImageLine2Bit(), fillPngImageLine4Bit(), fillPngImageLine8Bit(), fillPngImageLine16Bit(), fillPngImageLine24Bit() and fillPngImageLine48Bit() have been introduced. The line by line processing of images improves the performance by up to 3%.
  • The library gif.s7i has been refactored. The functions showHeader, showImageHeader, showExtension, readGraphicControlExtension and readApplicationExtension have been introduced. The type gifData has been introduced as well.
  • The library gif.s7i has been changed to process images line by line. This improves the performance by 2% to 4%.
  • The function readGifColorMap has been introduced in gif.s7i. This function is used in readHeader() and readImageHeader().
  • The library tar_cmds.s7i has been fixed to write the TAR EOF marker just once.
  • In crc32.s7i a fixed size array is used for the crc32Table.
  • Some icon pictures have been added to pic32.s7i.
  • In strifile.s7i the functions getwd() and getln() have been improved to ignore the '\r' of a "\r\n" sequence.
  • Definitions of TLS extensions have been added to tls.s7i and showtls.s7i.
  • In dialog.s7i the function bossMode() has been improved to use a sub-window.
  • In dialog.s7i the undocumented function buttonWindow() has been deprecated. The function clickedWindow() should be used instead. The programs carddemo.sd7, klondike.sd7, pairs.sd7, panic.sd7 and sokoban.sd7 have been changed to use clickedWindow() instead of the deprecated function.
  • Support for the PackBits compression has been added to calc7.sd7.
  • The program castle.sd7 has been improved to store castle.dat as a bstring named castleData in the program.
  • Several improvements have been made in the program panic.sd7:
    • Mouse clicks can be used as commands in addition to keyboard commands.
    • Sub-windows are used for player and monster images.
    • The await time is recomputed if it has already passed.
    • Unnecessary calls of allObjectsInvisible() and allObjectsVisible() have been removed.
    • The function process_command uses a case-statement instead of an if-elsif chain.
  • Several improvements have been made in the program dnafight.sd7:
    • Selecting bacteria and starting the simulation can be done with the mouse.
    • Constants for line and column delta have been introduced.
    • A glitch when positioning bacteria has been fixed.
  • In the program lander.sd7 a glitch in advanced lander has been fixed.
  • Several improvements have been made in the program sokoban.sd7:
    • Mouse clicks can be used to trigger a movement.
    • Clickable buttons for commands...
Read more

Seed7 release 2024-08-12

12 Aug 11:36
Compare
Choose a tag to compare

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.
  • T...
Read more

Seed7 release 2024-06-30

30 Jun 14:27
Compare
Choose a tag to compare

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.

Regards,
Thomas Mertes

Seed7 release 2024-04-29

29 Apr 10:00
Compare
Choose a tag to compare

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.

Regards,
Thomas Mertes