From af9573db02e54a5acf56d2b165c33d6e290d137f Mon Sep 17 00:00:00 2001 From: Thomas Mertes Date: Mon, 12 Aug 2024 13:17:21 +0200 Subject: [PATCH] Seed7 release 2024-08-12 --- doc/chlog.txt | 249 +++++++++++++++++++++++++++++++++++++++++++++++- doc/faq.htm | 100 +++++++++++++++---- doc/faq.txt | 103 +++++++++++++++----- doc/manual.htm | 105 +++++++++++++------- doc/manual.txt | 107 ++++++++++++++------- lib/pbm.s7i | 2 +- lib/pgm.s7i | 2 +- lib/ppm.s7i | 2 +- prg/files.txt | 10 +- src/level_rl.h | 2 +- src/read_me.htm | 50 ++++++++++ src/read_me.txt | 50 ++++++++++ 12 files changed, 664 insertions(+), 118 deletions(-) diff --git a/doc/chlog.txt b/doc/chlog.txt index f151849a..1bddf8c6 100644 --- a/doc/chlog.txt +++ b/doc/chlog.txt @@ -1,3 +1,248 @@ +20240812: +- 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. + 20240630: - Explanations about scanner functions and why some write statements raise RANGE_ERROR have been added to the FAQ. @@ -41,7 +286,7 @@ 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. + FILE_UNKNOWN for an 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. @@ -138,7 +383,7 @@ - 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. + priority as multiplication and division. - Interpreter and compiler have been improved to support the action ARR_SORT_REVERSE. - The functions qsort_array_reverse() and arr_sort_reverse() have diff --git a/doc/faq.htm b/doc/faq.htm index a3ac023a..af35b7ef 100644 --- a/doc/faq.htm +++ b/doc/faq.htm @@ -385,6 +385,9 @@

  • Why are & and <& defined for string concatenation?
  • +
  • +How is the number format specified when writing a number? +
  • What types of parameters does Seed7 have?
  • @@ -886,12 +889,12 @@


    The Seed7 package contains more than 100000 lines of C and more -than 400000 lines of Seed7. For version 2024-06-30 the number of lines is: +than 400000 lines of Seed7. For version 2024-08-12 the number of lines is:

    - - - - + + + +
    183204 C source files (*.c)
    13757 C header files (*.h)
    259140 Seed7 source files (*.sd7)
    186442 Seed7 library/include files (*.s7i)
    183664 C source files (*.c)
    13770 C header files (*.h)
    259238 Seed7 source files (*.sd7)
    190664 Seed7 library/include files (*.s7i)

    C code (*.c and *.h files) can be divided into the following areas:

    @@ -1226,6 +1229,8 @@

    chkbool ........... okay chkenum ........... okay chktime ........... okay +chkscan ........... okay +chkjson ........... okay chkbitdata ........... okay chkset ........... okay chkhsh ........... okay @@ -2624,6 +2629,44 @@

    about the conversion to strings and back.

    +

    How is the number format specified when writing a number? +


    +

    +The operator radix converts an integer or bigInteger number to a string using a radix. E.g.: +

    +writeln(48879 radix 16);
    +

    +The operator RADIX does the same with upper case characters. E.g.: +

    +writeln(3735928559_ RADIX 16);
    +

    +The operator lpad converts a value to string and pads it with spaces at the left side. E.g.: +

    +writeln(98765 lpad 6);
    +

    +The operator rpad converts a value to string and pads it with spaces at the right side. E.g.: +

    +writeln(name rpad 20);
    +

    +The operator digits converts a float to string in decimal fixed point notation. The number is rounded to the specified number of digits. E.g.: +

    +writeln(3.1415 digits 2);
    +

    +The operator sci converts a float to string in scientific notation. E.g.: +

    +writeln(0.012345 sci 4);
    +

    +The operator exp is used to specify the number of exponent digits. E.g.: +

    +writeln(1.2468e15 sci 2 exp 1);
    +

    +All these operators can be combined. E.g: +

    +writeln("decimal:    " <& number lpad 10);
    +writeln("hex:        " <& number radix 16 lpad 8);
    +writeln("scientific: " <& number sci 4 exp 2 lpad 14);
    +
    +

    What types of parameters does Seed7 have?


    @@ -3832,22 +3875,41 @@

    also compiles chkccomp.c. This program includes base.h and chkccomp.h. After the compilation chkccomp is executed with:

    -./chkccomp version.h
    +./chkccomp version.h "S7_LIB_DIR=$(S7_LIB_DIR)" "SEED7_LIBRARY=$(SEED7_LIBRARY) "LINK_TIME=$(LINK_TIME)"
     

    When chkccomp runs it copies the files base.h and settings.h to version.h. Then it tests the properties of the OS and the C compiler with various small test programs. The results of these tests are also written to version.h.

    -Afterwards the program setpaths.c is compiled and then executed with: +Afterwards chkccomp appends further information to version.h (which +includes the absolute path to the seed7 directory). The environment +variables S7_LIB_DIR and SEED7_LIBRARY allow the specification of the +final path to the Seed7 directory. If the seed7 directory will not move +afterwards these variables can be left empty. The environment variables +S7_LIB_DIR and SEED7_LIBRARY can be specified when make depend is invoked. E.g.:

    -./setpaths "S7_LIB_DIR=$(S7_LIB_DIR)" "SEED7_LIBRARY=$(SEED7_LIBRARY)" >> version.h
    +make S7_LIB_DIR=<lib-dir-path> SEED7_LIBRARY=<library-path> LINK_TIME=<value> depend
     

    -This appends further information to version.h (which includes the -absolute path to the seed7 directory). The environment variables S7_LIB_DIR -and SEED7_LIBRARY allow the specification of the final path to the -Seed7 directory. If the seed7 directory will not move afterwards these -variables can be left empty. +Each of the options S7_LIB_DIR, SEED7_LIBRARY and LINK_TIME can be ommited. +The following environment variables are defined by chkccomp: +

    + + + + + + + + +
    Variable Comment
    S7_LIB_DIR Absolute path to directory with static libraries
    SEED7_LIBRARY Absolute path of directory with *.s7i libraries
    CC_ENVIRONMENT_INI Name of environment ini file in the S7_LIB_DIR
    LINK_TIME Link libraries at 'BUILD' time or at 'RUN' time

    +When a package is created the option LINK_TIME can be set to BUILD. This means +that all libraries must be present when an executable is invoked. In this +case all the linked libraries must be added to the dependencies of the package. +The default of the option LINK_TIME is RUN. This means that the executables +do not depend on certain libraries. The libraries are searched for at +run-time, when they are needed. This allows that a library can be added later +and Seed7 can use it then.


    How does the Seed7 compiler get information about C compiler and runtime? @@ -3915,22 +3977,22 @@

    The table below shows the suggested directories for Linux/Unix/BSD:

    - + - - - + + +
    Directory Macro Group of files
    Directory Macro Group of files
    /usr/bin - Executables (s7 + s7c)
    /usr/lib/seed7/lib SEED7_LIBRARY Seed7 include libraries
    /usr/lib/seed7/bin S7_LIB_DIR Static libraries
    /usr/bin - Executables (s7 + s7c)
    /usr/lib64/seed7/lib SEED7_LIBRARY Seed7 include libraries
    /usr/lib64/seed7/bin S7_LIB_DIR Static libraries

    The macros must be defined, when the interpreter is compiled. This can be done by calling make depend with:

    -make S7_LIB_DIR=/usr/lib/seed7/bin SEED7_LIBRARY=/usr/lib/seed7/lib depend
    +make S7_LIB_DIR=/usr/lib64/seed7/bin SEED7_LIBRARY=/usr/lib64/seed7/lib depend
     

    Afterwards the interpreter can be compiled with 'make' and the Seed7 compiler can be compiled with 'make s7c'. This three make commands can be combined to

    -make S7_LIB_DIR=/usr/lib/seed7/bin SEED7_LIBRARY=/usr/lib/seed7/lib depend s7 s7c
    +make S7_LIB_DIR=/usr/lib64/seed7/bin SEED7_LIBRARY=/usr/lib64/seed7/lib depend s7 s7c
     

    Alternatively the Seed7 compiler can be compiled as post-install step. This requires that seed7/prg/s7c.sd7 is also installed. The actual diff --git a/doc/faq.txt b/doc/faq.txt index 79944c99..4e99f0fb 100644 --- a/doc/faq.txt +++ b/doc/faq.txt @@ -346,12 +346,12 @@ How many lines of code are in the Seed7 project? ================================================ The Seed7 package contains more than 100000 lines of C and more -than 400000 lines of Seed7. For version 2024-06-30 the number of lines is: +than 400000 lines of Seed7. For version 2024-08-12 the number of lines is: - 183204 C source files (*.c) - 13757 C header files (*.h) - 259140 Seed7 source files (*.sd7) - 186442 Seed7 library/include files (*.s7i) + 183664 C source files (*.c) + 13770 C header files (*.h) + 259238 Seed7 source files (*.sd7) + 190664 Seed7 library/include files (*.s7i) C code (*.c and *.h files) can be divided into the following areas: @@ -686,6 +686,8 @@ information from the interpreter): chkbool ........... okay chkenum ........... okay chktime ........... okay + chkscan ........... okay + chkjson ........... okay chkbitdata ........... okay chkset ........... okay chkhsh ........... okay @@ -2085,6 +2087,44 @@ enable_output. The description of the Seed7 file API also contains a chapter about the conversion to strings and back. +How is the number format specified when writing a number? +========================================================= + +The operator 'radix' converts an integer or bigInteger number to a string using a radix. E.g.: + + writeln(48879 radix 16); + +The operator 'RADIX' does the same with upper case characters. E.g.: + + writeln(3735928559_ RADIX 16); + +The operator 'lpad' converts a value to string and pads it with spaces at the left side. E.g.: + + writeln(98765 lpad 6); + +The operator 'rpad' converts a value to string and pads it with spaces at the right side. E.g.: + + writeln(name rpad 20); + +The operator 'digits' converts a float to string in decimal fixed point notation. The number is rounded to the specified number of digits. E.g.: + + writeln(3.1415 digits 2); + +The operator 'sci' converts a float to string in scientific notation. E.g.: + + writeln(0.012345 sci 4); + +The operator 'exp' is used to specify the number of exponent digits. E.g.: + + writeln(1.2468e15 sci 2 exp 1); + +All these operators can be combined. E.g: + + writeln("decimal: " <& number lpad 10); + writeln("hex: " <& number radix 16 lpad 8); + writeln("scientific: " <& number sci 4 exp 2 lpad 14); + + What types of parameters does Seed7 have? ========================================= @@ -3293,22 +3333,41 @@ that are specific for the OS and the C compiler. The command make depend also compiles 'chkccomp.c'. This program includes 'base.h' and 'chkccomp.h'. After the compilation 'chkccomp' is executed with: - ./chkccomp version.h + ./chkccomp version.h "S7_LIB_DIR=$(S7_LIB_DIR)" "SEED7_LIBRARY=$(SEED7_LIBRARY) "LINK_TIME=$(LINK_TIME)" When 'chkccomp' runs it copies the files 'base.h' and 'settings.h' to 'version.h'. Then it tests the properties of the OS and the C compiler with various small test programs. The results of these tests are also written to 'version.h'. -Afterwards the program 'setpaths.c' is compiled and then executed with: +Afterwards 'chkccomp' appends further information to 'version.h' (which +includes the absolute path to the seed7 directory). The environment +variables S7_LIB_DIR and SEED7_LIBRARY allow the specification of the +final path to the Seed7 directory. If the seed7 directory will not move +afterwards these variables can be left empty. The environment variables +S7_LIB_DIR and SEED7_LIBRARY can be specified when 'make depend' is invoked. E.g.: + + make S7_LIB_DIR= SEED7_LIBRARY= LINK_TIME= depend + +Each of the options S7_LIB_DIR, SEED7_LIBRARY and LINK_TIME can be ommited. +The following environment variables are defined by 'chkccomp': - ./setpaths "S7_LIB_DIR=$(S7_LIB_DIR)" "SEED7_LIBRARY=$(SEED7_LIBRARY)" >> version.h + +--------------------+--------------------------------------------------+ + | Variable | Comment | + +--------------------+--------------------------------------------------+ + | S7_LIB_DIR | Absolute path to directory with static libraries | + | SEED7_LIBRARY | Absolute path of directory with *.s7i libraries | + | CC_ENVIRONMENT_INI | Name of environment ini file in the S7_LIB_DIR | + | LINK_TIME | Link libraries at 'BUILD' time or at 'RUN' time | + +--------------------+--------------------------------------------------+ -This appends further information to 'version.h' (which includes the -absolute path to the seed7 directory). The environment variables S7_LIB_DIR -and SEED7_LIBRARY allow the specification of the final path to the -Seed7 directory. If the seed7 directory will not move afterwards these -variables can be left empty. +When a package is created the option LINK_TIME can be set to BUILD. This means +that all libraries must be present when an executable is invoked. In this +case all the linked libraries must be added to the dependencies of the package. +The default of the option LINK_TIME is RUN. This means that the executables +do not depend on certain libraries. The libraries are searched for at +run-time, when they are needed. This allows that a library can be added later +and Seed7 can use it then. How does the Seed7 compiler get information about C compiler and runtime? @@ -3375,23 +3434,23 @@ A binary Seed7 package needs to install four groups of files: The table below shows the suggested directories for Linux/Unix/BSD: - +---------------------+---------------+-------------------------+ - | Directory | Macro | Group of files | - +---------------------+---------------+-------------------------+ - | /usr/bin | - | Executables (s7 + s7c) | - | /usr/lib/seed7/lib | SEED7_LIBRARY | Seed7 include libraries | - | /usr/lib/seed7/bin | S7_LIB_DIR | Static libraries | - +---------------------+---------------+-------------------------+ + +-----------------------+---------------+-------------------------+ + | Directory | Macro | Group of files | + +-----------------------+---------------+-------------------------+ + | /usr/bin | - | Executables (s7 + s7c) | + | /usr/lib64/seed7/lib | SEED7_LIBRARY | Seed7 include libraries | + | /usr/lib64/seed7/bin | S7_LIB_DIR | Static libraries | + +-----------------------+---------------+-------------------------+ The macros must be defined, when the interpreter is compiled. This can be done by calling 'make depend' with: - make S7_LIB_DIR=/usr/lib/seed7/bin SEED7_LIBRARY=/usr/lib/seed7/lib depend + make S7_LIB_DIR=/usr/lib64/seed7/bin SEED7_LIBRARY=/usr/lib64/seed7/lib depend Afterwards the interpreter can be compiled with 'make' and the Seed7 compiler can be compiled with 'make s7c'. This three make commands can be combined to - make S7_LIB_DIR=/usr/lib/seed7/bin SEED7_LIBRARY=/usr/lib/seed7/lib depend s7 s7c + make S7_LIB_DIR=/usr/lib64/seed7/bin SEED7_LIBRARY=/usr/lib64/seed7/lib depend s7 s7c Alternatively the Seed7 compiler can be compiled as post-install step. This requires that 'seed7/prg/s7c.sd7' is also installed. The actual diff --git a/doc/manual.htm b/doc/manual.htm index 141d41c0..b89badf1 100644 --- a/doc/manual.htm +++ b/doc/manual.htm @@ -498,6 +498,7 @@

    CONTENTS

  • GRAPHIC_ERROR
  • ILLEGAL_ACTION
  • Handlers
  • +
  • Trace exceptions
  • Stack trace
  • Suppressing exception checks
  • Signals
  • @@ -1734,7 +1735,8 @@

    CONTENTS

    Templates allow the declaration of functions where the actual types are specified later. The function declarations are done - inside a procedure that has a type as parameter. E.g.: + inside a procedure that has a type as parameter. The library + integer.s7i defines the template DECLARE_MIN_MAX as:

     const proc: DECLARE_MIN_MAX (in type: aType) is func
       begin
    @@ -1747,13 +1749,13 @@ 

    CONTENTS

    end func;

    - The procedure DECLARE_MIN_MAX uses the type parameter aType - to declare the functions min and max. The template must be - instantiated for every actual type which needs min and max. E.g.: + The template procedure DECLARE_MIN_MAX uses the type parameter + aType to declare the functions min and max. The template is + instantiated for every actual type which needs min and max. E.g.:

    -DECLARE_MIN_MAX(integer);
    -DECLARE_MIN_MAX(bigInteger);
    -DECLARE_MIN_MAX(float);
    +DECLARE_MIN_MAX(integer);     # Instantiated in the integer.s7i library
    +DECLARE_MIN_MAX(bigInteger);  # Instantiated in the bigint.s7i library
    +DECLARE_MIN_MAX(float);       # Instantiated in the float.s7i library
     

    This allows for expressions like min(2, 5) or min(PI, E).

    @@ -9541,8 +9543,8 @@

    CONTENTS

    KEY_MOUSE1 Mouse button 1 (counted from left) KEY_MOUSE2 Mouse button 2 (counted from left) KEY_MOUSE3 Mouse button 3 (counted from left) - KEY_MOUSE4 Mouse wheel scroll up - KEY_MOUSE5 Mouse wheel scroll down + KEY_MOUSE4 Mouse wheel scroll up + KEY_MOUSE5 Mouse wheel scroll down KEY_MOUSE_FWD Mouse forward button KEY_MOUSE_BACK Mouse back button KEY_SFT_MOUSE1 Shift mouse button 1 (counted from left) @@ -16514,7 +16516,7 @@

    CONTENTS

    17. ERRORS

    -

    16.1 Parsing errors

    +

    17.1 Parsing errors

    Parsing errors are triggered by interpreter and compiler. The checks for these errors are done before the program is executed respectively @@ -16592,7 +16594,7 @@

    CONTENTS

    Undefined error

    -

    16.2 Compilation errors

    +

    17.2 Compilation errors

    The compiler does checks when generating code. As a result of the checks some warnings might be written. The warning level can @@ -16611,7 +16613,7 @@

    CONTENTS

    1 Forward definition of the called function.

    -

    16.3 Exceptions

    +

    17.3 Exceptions

    An exception is an anomalous event that arises during program execution. Exceptions change the normal flow of program execution. An exception @@ -16629,7 +16631,7 @@

    CONTENTS

    const EXCEPTION: MY_ERROR is enumlit;

    -

    16.3.1 MEMORY_ERROR

    +

    17.3.1 MEMORY_ERROR

    The exception MEMORY_ERROR is raised if there is not enough memory to store some data. This error can be raised from the run-time library @@ -16642,7 +16644,7 @@

    CONTENTS

    Additionally the interpreter kernel may raise this exception also.

    -

    16.3.2 NUMERIC_ERROR

    +

    17.3.2 NUMERIC_ERROR

    The exception NUMERIC_ERROR is raised if a numeric operation cannot deliver a correct result. This includes several things that @@ -16672,7 +16674,7 @@

    CONTENTS

    positive arguments. E.g.: sqrt(-1) raises NUMERIC_ERROR.

    -

    16.3.3 OVERFLOW_ERROR

    +

    17.3.3 OVERFLOW_ERROR

    An integer overflow occurs if a calculation produces a result that cannot be stored in an integer variable. This happens if the result @@ -16717,7 +16719,7 @@

    CONTENTS

    -so can be used to suppress the generation of integer overflow checks. If an overflow situation occurs, although overflow checking has been switched off (with -so), the behavior is undefined (see chapter - 16.6 Suppressing exception checks). + 17.6 Suppressing exception checks).

    The separate overflow exception allows easy recognition of overflow situations. All overflow situations, where OVERFLOW_ERROR is raised @@ -16748,7 +16750,7 @@

    CONTENTS

    result.

    -

    16.3.4 INDEX_ERROR

    +

    17.3.4 INDEX_ERROR

    An INDEX_ERROR occurs if an index is used to access an array, string, bstring or ref_list element beyond the elements that actually exist. @@ -16771,10 +16773,10 @@

    CONTENTS

    existing element. The option -si can be used to suppress the generation of index checks. If a nonexistent element is referred, although index checking has been switched off (with -si), the behavior is undefined - (see chapter 16.6 Suppressing exception checks). + (see chapter 17.6 Suppressing exception checks).

    -

    16.3.5 RANGE_ERROR

    +

    17.3.5 RANGE_ERROR

    Many functions define a range of valid arguments and raise RANGE_ERROR if this range is violated. @@ -16815,7 +16817,7 @@

    CONTENTS

    write, writeln, gets, length, truncate, seek, tell, skip.

    -

    16.3.6 FILE_ERROR

    +

    17.3.6 FILE_ERROR

    A FILE_ERROR occurs if an illegal operation with a file is done.

    @@ -16827,7 +16829,7 @@

    CONTENTS

    inetSocketAddress, inetListenerAddress, openInetSocket, openInetListener.

    -

    16.3.7 DATABASE_ERROR

    +

    17.3.7 DATABASE_ERROR

    The exception DATABASE_ERROR may be raised by database functions. If a DATABASE_ERROR is caught it is possible @@ -16845,14 +16847,14 @@

    CONTENTS

    be used to specify the place of the connector library.

    -

    16.3.8 GRAPHIC_ERROR

    +

    17.3.8 GRAPHIC_ERROR

    The exception GRAPHIC_ERROR may be raised by graphic drivers. If an underlying graphic library function reports an error a GRAPHIC_ERROR is raised.

    -

    16.3.9 ILLEGAL_ACTION

    +

    17.3.9 ILLEGAL_ACTION

    The exception ILLEGAL_ACTION may be raised by the interpreter kernel, if a primitive action does not point to any legal action. @@ -16861,7 +16863,7 @@

    CONTENTS

    is also raised if the primitive action ACT_ILLEGAL is executed.

    -

    16.4 Handlers

    +

    17.4 Handlers

    To catch an EXCEPTION the following handler construct can be used:

    @@ -16892,7 +16894,42 @@ 

    CONTENTS

    end block;

    -

    16.5 Stack trace

    +

    17.5 Trace exceptions

    +

    + The interpreter option -te can be used to trace exceptions and handlers. + If an exception occurs the following is written: +

    +*** Exception NUMERIC_ERROR raised at integer.s7i(118)
    +{160000 div fuel_max } at lander.sd7(836)
    +*** Action "INT_DIV"
    +
    +*** The following commands are possible:
    +  RETURN  Continue
    +  *       Terminate
    +  #       Terminate with stack trace
    +  /       Trigger SIGFPE
    +  !n      Raise exception with number (e.g.: !1 raises MEMORY_ERROR)
    +

    + In detail: +

    + +

    17.6 Stack trace

    If an exception is not caught the program is terminated and the s7 interpreter writes a stack trace: @@ -16901,15 +16938,15 @@

    CONTENTS

    {integer: <SYMBOLOBJECT> *NULL_ENTITY_OBJECT* div fuel_max } Stack: -in (val integer: dividend) div (val integer: divisor) at integer.s7i(116) -in init_display at lander.sd7(839) -in setup at lander.sd7(908) -in main at lander.sd7(1541) +in (val integer: dividend) div (val integer: divisor) at integer.s7i(118) +in init_display at lander.sd7(836) +in setup at lander.sd7(906) +in main at lander.sd7(1536)

    The stack trace shows that a NUMERIC_ERROR was raised by the div operation. - This operation is defined in line 95 of integer.s7i. More interesting is that + This operation is defined in line 118 of integer.s7i. More interesting is that div was called from the function 'init_display' in - line 840 of lander.sd7. A NUMERIC_ERROR with div is + line 836 of lander.sd7. A NUMERIC_ERROR with div is probably caused by a zero division. A short examination in lander.sd7 shows that an assignment to 'fuel_max' was commented out to show how stack traces work.

    @@ -16976,7 +17013,7 @@

    CONTENTS

    allows the debugger to show a backtrace for uncaught Seed7 exceptions.

    -

    16.6 Suppressing exception checks

    +

    17.7 Suppressing exception checks

    A Seed7 program can be compiled with the option -sx, to suppress the generation of checks for exceptions. The suppressed checks x are @@ -17020,7 +17057,7 @@

    CONTENTS

    necessary to decide about the omission of exception checking.

    -

    16.7 Signals

    +

    17.8 Signals

    A signal is an asynchronous notification of an event. The event can come from outside such as a request to terminate the program. @@ -17074,7 +17111,7 @@

    CONTENTS

    must be executed with a debugger to get a stack trace.

    -

    16.8 Other errors and warnings

    +

    17.9 Other errors and warnings

    No more memory. Parsing terminated.
    This error message is displayed after the parsing error 1 diff --git a/doc/manual.txt b/doc/manual.txt index 9d68c9ec..3092179c 100644 --- a/doc/manual.txt +++ b/doc/manual.txt @@ -287,10 +287,11 @@ CONTENTS 17.3.8 GRAPHIC_ERROR 17.3.9 ILLEGAL_ACTION 17.4 Handlers - 17.5 Stack trace - 17.6 Suppressing exception checks - 17.7 Signals - 17.8 Other errors and warnings + 17.5 Trace exceptions + 17.6 Stack trace + 17.7 Suppressing exception checks + 17.8 Signals + 17.9 Other errors and warnings @@ -1523,7 +1524,8 @@ CONTENTS Templates allow the declaration of functions where the actual types are specified later. The function declarations are done - inside a procedure that has a type as parameter. E.g.: + inside a procedure that has a type as parameter. The library + integer.s7i defines the template DECLARE_MIN_MAX as: const proc: DECLARE_MIN_MAX (in type: aType) is func begin @@ -1536,13 +1538,13 @@ CONTENTS end func; - The procedure 'DECLARE_MIN_MAX' uses the type parameter 'aType' - to declare the functions 'min' and 'max'. The template must be + The template procedure 'DECLARE_MIN_MAX' uses the type parameter + 'aType' to declare the functions 'min' and 'max'. The template is instantiated for every actual type which needs 'min' and 'max'. E.g.: - DECLARE_MIN_MAX(integer); - DECLARE_MIN_MAX(bigInteger); - DECLARE_MIN_MAX(float); + DECLARE_MIN_MAX(integer); # Instantiated in the integer.s7i library + DECLARE_MIN_MAX(bigInteger); # Instantiated in the bigint.s7i library + DECLARE_MIN_MAX(float); # Instantiated in the float.s7i library This allows for expressions like 'min(2, 5)' or 'min(PI, E)'. @@ -16303,7 +16305,7 @@ This way a program can also receive KEY_CLOSE and KEY_RESIZE: 17. ERRORS ========== -16.1 Parsing errors +17.1 Parsing errors Parsing errors are triggered by interpreter and compiler. The checks for these errors are done before the program is executed respectively @@ -16381,7 +16383,7 @@ This way a program can also receive KEY_CLOSE and KEY_RESIZE: Undefined error -16.2 Compilation errors +17.2 Compilation errors The compiler does checks when generating code. As a result of the checks some warnings might be written. The warning level can @@ -16400,7 +16402,7 @@ This way a program can also receive KEY_CLOSE and KEY_RESIZE: 1 | Forward definition of the called function. -16.3 Exceptions +17.3 Exceptions An exception is an anomalous event that arises during program execution. Exceptions change the normal flow of program execution. An exception @@ -16418,7 +16420,7 @@ This way a program can also receive KEY_CLOSE and KEY_RESIZE: const EXCEPTION: MY_ERROR is enumlit; -16.3.1 MEMORY_ERROR +17.3.1 MEMORY_ERROR The exception MEMORY_ERROR is raised if there is not enough memory to store some data. This error can be raised from the run-time library @@ -16431,7 +16433,7 @@ This way a program can also receive KEY_CLOSE and KEY_RESIZE: Additionally the interpreter kernel may raise this exception also. -16.3.2 NUMERIC_ERROR +17.3.2 NUMERIC_ERROR The exception NUMERIC_ERROR is raised if a numeric operation cannot deliver a correct result. This includes several things that @@ -16461,7 +16463,7 @@ This way a program can also receive KEY_CLOSE and KEY_RESIZE: positive arguments. E.g.: sqrt(-1) raises NUMERIC_ERROR. -16.3.3 OVERFLOW_ERROR +17.3.3 OVERFLOW_ERROR An integer overflow occurs if a calculation produces a result that cannot be stored in an 'integer' variable. This happens if the result @@ -16506,7 +16508,7 @@ This way a program can also receive KEY_CLOSE and KEY_RESIZE: -so can be used to suppress the generation of integer overflow checks. If an overflow situation occurs, although overflow checking has been switched off (with -so), the behavior is undefined (see chapter - 16.6 Suppressing exception checks). + 17.6 Suppressing exception checks). The separate overflow exception allows easy recognition of overflow situations. All overflow situations, where OVERFLOW_ERROR is raised @@ -16537,7 +16539,7 @@ This way a program can also receive KEY_CLOSE and KEY_RESIZE: result. -16.3.4 INDEX_ERROR +17.3.4 INDEX_ERROR An INDEX_ERROR occurs if an index is used to access an 'array', 'string', 'bstring' or 'ref_list' element beyond the elements that actually exist. @@ -16560,10 +16562,10 @@ This way a program can also receive KEY_CLOSE and KEY_RESIZE: existing element. The option -si can be used to suppress the generation of index checks. If a nonexistent element is referred, although index checking has been switched off (with -si), the behavior is undefined - (see chapter 16.6 Suppressing exception checks). + (see chapter 17.6 Suppressing exception checks). -16.3.5 RANGE_ERROR +17.3.5 RANGE_ERROR Many functions define a range of valid arguments and raise RANGE_ERROR if this range is violated. @@ -16604,7 +16606,7 @@ This way a program can also receive KEY_CLOSE and KEY_RESIZE: write, writeln, gets, length, truncate, seek, tell, skip. -16.3.6 FILE_ERROR +17.3.6 FILE_ERROR A FILE_ERROR occurs if an illegal operation with a file is done. @@ -16616,7 +16618,7 @@ This way a program can also receive KEY_CLOSE and KEY_RESIZE: inetSocketAddress, inetListenerAddress, openInetSocket, openInetListener. -16.3.7 DATABASE_ERROR +17.3.7 DATABASE_ERROR The exception DATABASE_ERROR may be raised by database functions. If a DATABASE_ERROR is caught it is possible @@ -16634,14 +16636,14 @@ This way a program can also receive KEY_CLOSE and KEY_RESIZE: be used to specify the place of the connector library. -16.3.8 GRAPHIC_ERROR +17.3.8 GRAPHIC_ERROR The exception GRAPHIC_ERROR may be raised by graphic drivers. If an underlying graphic library function reports an error a GRAPHIC_ERROR is raised. -16.3.9 ILLEGAL_ACTION +17.3.9 ILLEGAL_ACTION The exception ILLEGAL_ACTION may be raised by the interpreter kernel, if a primitive action does not point to any legal action. @@ -16650,7 +16652,7 @@ This way a program can also receive KEY_CLOSE and KEY_RESIZE: is also raised if the primitive action ACT_ILLEGAL is executed. -16.4 Handlers +17.4 Handlers To catch an EXCEPTION the following handler construct can be used: @@ -16681,7 +16683,42 @@ This way a program can also receive KEY_CLOSE and KEY_RESIZE: end block; -16.5 Stack trace +17.5 Trace exceptions + + The interpreter option -te can be used to trace exceptions and handlers. + If an exception occurs the following is written: + + *** Exception NUMERIC_ERROR raised at integer.s7i(118) + {160000 div fuel_max } at lander.sd7(836) + *** Action "INT_DIV" + + *** The following commands are possible: + RETURN Continue + * Terminate + # Terminate with stack trace + / Trigger SIGFPE + !n Raise exception with number (e.g.: !1 raises MEMORY_ERROR) + + In detail: + + - After pressing RETURN the program continues without any change. + - Pressing * and RETURN terminates the program immediately. + - Pressing # and RETURN writes a stack trace and terminates the program. E.g.: + + *** Program terminated after exception NUMERIC_ERROR raised with + {integer: *NULL_ENTITY_OBJECT* div fuel_max } + + Stack: + in (val integer: dividend) div (val integer: divisor) at integer.s7i(118) + in init_display at lander.sd7(836) + in setup at lander.sd7(906) + in main at lander.sd7(1536) + + - Pressing / and RETURN triggers the signal SIGFPE. If the interpreter has + been started from a debugger, this triggers the debugger. + + +17.6 Stack trace If an exception is not caught the program is terminated and the s7 interpreter writes a stack trace: @@ -16690,15 +16727,15 @@ This way a program can also receive KEY_CLOSE and KEY_RESIZE: {integer: *NULL_ENTITY_OBJECT* div fuel_max } Stack: - in (val integer: dividend) div (val integer: divisor) at integer.s7i(116) - in init_display at lander.sd7(839) - in setup at lander.sd7(908) - in main at lander.sd7(1541) + in (val integer: dividend) div (val integer: divisor) at integer.s7i(118) + in init_display at lander.sd7(836) + in setup at lander.sd7(906) + in main at lander.sd7(1536) The stack trace shows that a NUMERIC_ERROR was raised by the 'div' operation. - This operation is defined in line 95 of "integer.s7i". More interesting is that + This operation is defined in line 118 of "integer.s7i". More interesting is that 'div' was called from the function 'init_display' in - line 840 of "lander.sd7". A NUMERIC_ERROR with 'div' is + line 836 of "lander.sd7". A NUMERIC_ERROR with 'div' is probably caused by a zero division. A short examination in "lander.sd7" shows that an assignment to 'fuel_max' was commented out to show how stack traces work. @@ -16765,7 +16802,7 @@ This way a program can also receive KEY_CLOSE and KEY_RESIZE: allows the debugger to show a backtrace for uncaught Seed7 exceptions. -16.6 Suppressing exception checks +17.7 Suppressing exception checks A Seed7 program can be compiled with the option -sx, to suppress the generation of checks for exceptions. The suppressed checks x are @@ -16809,7 +16846,7 @@ This way a program can also receive KEY_CLOSE and KEY_RESIZE: necessary to decide about the omission of exception checking. -16.7 Signals +17.8 Signals A signal is an asynchronous notification of an event. The event can come from outside such as a request to terminate the program. @@ -16863,7 +16900,7 @@ This way a program can also receive KEY_CLOSE and KEY_RESIZE: must be executed with a debugger to get a stack trace. -16.8 Other errors and warnings +17.9 Other errors and warnings No more memory. Parsing terminated. This error message is displayed after the parsing error 1 diff --git a/lib/pbm.s7i b/lib/pbm.s7i index 9223e7c0..780b3ece 100644 --- a/lib/pbm.s7i +++ b/lib/pbm.s7i @@ -1,7 +1,7 @@ (********************************************************************) (* *) -(* pbm.s7i Support for PBM (portable bitmap) image format. *) +(* pbm.s7i Support for PBM (portable bitmap) image format *) (* Copyright (C) 2024 Thomas Mertes *) (* *) (* This file is part of the Seed7 Runtime Library. *) diff --git a/lib/pgm.s7i b/lib/pgm.s7i index 473104b1..0d2d0a81 100644 --- a/lib/pgm.s7i +++ b/lib/pgm.s7i @@ -1,7 +1,7 @@ (********************************************************************) (* *) -(* pgm.s7i Support for PGM (portable graymap) image format. *) +(* pgm.s7i Support for PGM (portable graymap) image format *) (* Copyright (C) 2024 Thomas Mertes *) (* *) (* This file is part of the Seed7 Runtime Library. *) diff --git a/lib/ppm.s7i b/lib/ppm.s7i index 77a19651..bafe8ee6 100644 --- a/lib/ppm.s7i +++ b/lib/ppm.s7i @@ -1,7 +1,7 @@ (********************************************************************) (* *) -(* ppm.s7i Support for PPM (portable pixmap) image format. *) +(* ppm.s7i Support for PPM (portable pixmap) image format *) (* Copyright (C) 2021 - 2024 Thomas Mertes *) (* *) (* This file is part of the Seed7 Runtime Library. *) diff --git a/prg/files.txt b/prg/files.txt index f5c75904..fd16bb87 100644 --- a/prg/files.txt +++ b/prg/files.txt @@ -176,11 +176,13 @@ draw.s7i Portable graphic library duration.s7i Time and date duration support library echo.s7i Filter file which generates an echo of the input editline.s7i Filter file for linewise editing with history +elf.s7i Support for the ELF executable and link format elliptic.s7i Support for elliptic curve cryptography (ECC). enable_io.s7i Templates to enable file I/O for a given type encoding.s7i Encoding and decoding functions enumeration.s7i Enumeration types support library environment.s7i Support for program arguments and environment. +exif.s7i Support for the exchangeable image file format external_file.s7i File implementation type describing OS files field.s7i Filter file which reads the input fieldwise file.s7i Interface type describing sequential files. @@ -219,7 +221,7 @@ inflate.s7i Inflate uncompression algorithm inifile.s7i Read key value pairs from an INI file integer.s7i Integer support library iobuffer.s7i Implementation type for a buffered file. -jpeg.s7i Support for the JPEG image file format. +jpeg.s7i Support for the JPEG image file format json.s7i Reading and processing JSON data with a JSON DOM. keybd.s7i Read from keyboard without buffering and echo keydescr.s7i Descriptive text for function keys @@ -242,16 +244,19 @@ msgdigest.s7i Message digest and secure hash algorithms. multiscr.s7i Demonstration for several file filters null_file.s7i Base implementation type for all files osfiles.s7i Functions to handle operating system files +pbm.s7i Support for PBM (portable bitmap) image format pem.s7i Support for the PEM cryptographic file format. +pgm.s7i Support for PGM (portable graymap) image format pic16.s7i Pictures in the size 16 x 16 pic32.s7i Pictures in the size 32 x 32 pic_util.s7i Picture utility functions +pixelimage.s7i Support for pixelImage (2D array of pixels) pixmap_file.s7i Text implementation type to use a pixmap font pixmapfont.s7i Defines pixmapFontType and the font cache pkcs1.s7i RSA public-key cryptography standard #1 support. png.s7i Support for the PNG image file format. poll.s7i Support for pollData and the poll function -ppm.s7i Support for the PPM image file format. +ppm.s7i Support for PPM (portable pixmap) image format process.s7i Support for creating processes progs.s7i Program handling support library propertyfile.s7i Read key-value pairs from a property file @@ -260,6 +265,7 @@ ref_list.s7i Reference list support library reference.s7i Reference to object support library reverse.s7i Filter file which writes right to left on output rpm.s7i Rpm archive library +rpmext.s7i Extension library for the RPM archive scanfile.s7i File scanner functions scanjson.s7i String and file scanner functions for JSON scanstri.s7i String scanner functions diff --git a/src/level_rl.h b/src/level_rl.h index 3bb08f75..becc58f1 100644 --- a/src/level_rl.h +++ b/src/level_rl.h @@ -1 +1 @@ -#define LEVEL 60 +#define LEVEL 70 diff --git a/src/read_me.htm b/src/read_me.htm index fb886f21..11bfdfa5 100644 --- a/src/read_me.htm +++ b/src/read_me.htm @@ -243,6 +243,7 @@ mk_cygw.mak Windows (Cygwin) (g)make gcc sh mk_msys.mak Windows (MSYS) mingw32-make gcc sh mk_mingw.mak Windows (MinGW) mingw32-make gcc cmd.exe + mk_mingc.mak Windows (MinGW) make7 gcc cmd.exe mk_nmake.mak Windows (MinGW) nmake gcc cmd.exe mk_msvc.mak Windows (MSVC) nmake cl cmd.exe mk_bcc32.mak Windows (bcc32) make bcc32 cmd.exe @@ -380,6 +381,53 @@ Keep in mind to use the same 'make' utility as before.

    +

    COMPILING UNDER WINDOWS WITH GCC FROM THE INSTALLER +

    + The Seed7 installer for Windows uses an encapsulated gcc + in the directory 'seed7\gcc'. This gcc can be invoked via the + file 'seed7\bin\call_gcc.bat'. This ensures the encapsulated + gcc and another gcc do not interfere with each other. The + makefile 'mk_mingc.mak' invokes gcc via 'call_gcc.bat' and + ar via 'call_ar.bat'. +

    + To use Seed7 from GitHub with the encapsulated gcc: +

    + Use the make7 command and always use the option '-f mk_mingc.mak': +

    +make7 -f mk_mingc.mak clean
    +make7 -f mk_mingc.mak depend
    +make7 -f mk_mingc.mak
    +

    + Don't forget '-f mk_mingc.mak' for later build commands. E.g.: +

    +make7 -f mk_mingc.mak s7c
    +make7 -f mk_mingc.mak test
    +make7 -f mk_mingc.mak utils
    +

    + After switching from the installers version to the GitHub + version it is necessary to change the paths with: +

    +make7 -f mk_mingc.mak install
    +

    + After an update from GitHub (git pull in the seed7 directory) + the commands starting from +

    +make7 -f mk_mingc.mak clean
    +

    + can be used to compile the new version. +

    +

    COMPILING UNDER WINDOWS WITH CL FROM MSVC

    To compile Seed7 with cl and nmake (C compiler and make @@ -1223,6 +1271,8 @@ chkbig ........... okay chkbool ........... okay chkenum ........... okay +chkscan ........... okay +chkjson ........... okay chkbitdata ........... okay chkset ........... okay chkhsh ........... okay diff --git a/src/read_me.txt b/src/read_me.txt index a1473c71..b23e320e 100644 --- a/src/read_me.txt +++ b/src/read_me.txt @@ -32,6 +32,7 @@ THE MAKEFILES mk_cygw.mak | Windows (Cygwin)| (g)make | gcc | sh mk_msys.mak | Windows (MSYS) | mingw32-make | gcc | sh mk_mingw.mak | Windows (MinGW) | mingw32-make | gcc | cmd.exe + mk_mingc.mak | Windows (MinGW) | make7 | gcc | cmd.exe mk_nmake.mak | Windows (MinGW) | nmake | gcc | cmd.exe mk_msvc.mak | Windows (MSVC) | nmake | cl | cmd.exe mk_bcc32.mak | Windows (bcc32) | make | bcc32 | cmd.exe @@ -169,6 +170,53 @@ COMPILING UNDER WINDOWS WITH GCC FROM MINGW Keep in mind to use the same 'make' utility as before. +COMPILING UNDER WINDOWS WITH GCC FROM THE INSTALLER + + The Seed7 installer for Windows uses an encapsulated gcc + in the directory 'seed7\gcc'. This gcc can be invoked via the + file 'seed7\bin\call_gcc.bat'. This ensures the encapsulated + gcc and another gcc do not interfere with each other. The + makefile 'mk_mingc.mak' invokes gcc via 'call_gcc.bat' and + ar via 'call_ar.bat'. + + To use Seed7 from GitHub with the encapsulated gcc: + + - Decide for a place for the seed7 directory from GitHub. + - This place should differ from the place of the seed7 + directory created by the installer. + - Clone Seed7 into the new place with + 'git clone https://github.com/ThomasMertes/seed7.git'. + - The clone creates a new seed7 directory. + - Copy the installers seed7\gcc directory to the GitHub + created seed7 directory. + - Go to the GitHub created 'seed7\src' (with the cd + command). + + Use the make7 command and always use the option '-f mk_mingc.mak': + + make7 -f mk_mingc.mak clean + make7 -f mk_mingc.mak depend + make7 -f mk_mingc.mak + + Don't forget '-f mk_mingc.mak' for later build commands. E.g.: + + make7 -f mk_mingc.mak s7c + make7 -f mk_mingc.mak test + make7 -f mk_mingc.mak utils + + After switching from the installers version to the GitHub + version it is necessary to change the paths with: + + make7 -f mk_mingc.mak install + + After an update from GitHub (git pull in the seed7 directory) + the commands starting from + + make7 -f mk_mingc.mak clean + + can be used to compile the new version. + + COMPILING UNDER WINDOWS WITH CL FROM MSVC To compile Seed7 with cl and nmake (C compiler and make @@ -1012,6 +1060,8 @@ HOW TO VERIFY THAT THE INTERPRETER WORKS CORRECT? chkbig ........... okay chkbool ........... okay chkenum ........... okay + chkscan ........... okay + chkjson ........... okay chkbitdata ........... okay chkset ........... okay chkhsh ........... okay