HomeFreeBSD

lang/seed7: update to 05_20190303

Description

lang/seed7: update to 05_20190303

20190303:

  • The makefile mk_tcc_l.mak has been added. This makefile supports compiling with the tcc C compiler under Linux.
  • The makefile mk_tcc_w.mak has been added. This makefile is experimental and supports compiling with the tcc C compiler under Windows.
  • The example program brainf7.sd7 has been added. Brainf7 is a Brainfuck interpreter.
  • The example program hilbert.sd7 has been added. Hilbert displays a Hilbert curve.
  • The example program queen.sd7 has been added. Queen solves the n queen problem.
  • The example program spigotpi.sd7 has been added. Spigotpi writes digits of PI with a spigot algorithm.
  • The new library csv.s7i has been added. This library supports converting to and from comma-separated values (CSV).
  • Several improvements in the Seed7 compiler (s7c) have been done:
    • In flt_act.s7i the function to process FLT_ISNAN has been improved to make sure, that the argument of the isnan() macro never contains preprocessor directives (e.g. #line directives). Some C compilers do not allow preprocessor directives in the argument list of a macro. Many thanks go to Alexander Vlasov for reporting this problem and for his help to find a solution.
    • In comp/str_act.s7i the function optimize_str_cat has been improved to assign the constant parts of strConcatN() outside of the actual expression. This might open possibilities to optimize the expression.
    • The function process_forward_declaration in the compiler (s7c) has been improved to avoid, that a prototype of a forward declared function, is written twice.
    • The function process_dynamic_param_implements has been improved to generate a switch-statement instead of an if-then-else chain. Additionally double entries are avoided now.
    • The function process_const_func_call has been improved to assign c_params.temp_assigns to c_expr.temp_assigns instead of c_expr.temp_decls.
    • The function processFuncValue has been improved to define the type and the function of the actual name parameter only once (with defineActualFuncParam()). A redefinition could happen when functions, that call functions with name parameters, are inlined.
    • The handling of the option -te (trace exceptions) has been improved.
    • The function process_const_func_declaration() has been improved to request, that for functions using the result mechanism the result is returned, when possible, as c_expr.expr_result. This way process_return_value() does not need to copy this string values. E.g. When the result of intStrToBuffer(), chrCLitToBuffer(), chrStrMacro(), strHeadSlice(), chrStrMacro() or strTailSlice() is used as the result value of a user defined function.
    • The function defineFunctype has been added and the function getAnyParamToTempAssigns has been improved to provide addresses of plain INTOBJECT, FLOATOBJECT, CHAROBJECT, STRIOBJECT and BSTRIOBJECT values. In this case the address is taken from a temporary variable.
    • In write_file_head() and init_type_constants() the creation of type constants has been improved.
  • The functions skip() and copyFile() have been added to file.s7i.
  • The function makeParentDirs() has been added to osfiles.s7i.
  • In cli_cmds.s7i the function doMkdirCmd has been improved to call the new function makeParentDirs().
  • In tar_cmds.s7i the functions tarXtract and tarCreate have been improved to avoid, that the whole file is read into a string. This avoids a MEMORY_ERROR, when the file does not fit into a string.
  • The function tarXtract has been improved to extract empty regular files and to create non-existing parent directories (with makeParentDirs())
  • In gzip.s7i the functions openGzipFile(), close() and write() have been improved, to write the compressed data in blocks with a maximum size. This avoids a MEMORY_ERROR, when huge files are compressed.
  • In gzip.s7i the function openGunzipFile has been changed to have a file as parameter instead of a string. This way it is not necessary to read the whole compressed data into a string.
  • A variant of the function readGzipHeader has been added to gzip.s7i.
  • A variant of the function getAsciiz has been added to bytedata.s7i.
  • A variant of the function crc32 has been added to crc32.s7i.
  • The program ftp7.sd7 has been improved to support the commands !ls -l, !dir, !ls, !pwd, !mkdir and !rmdir.
  • The function noCtrlChars has been removed from db7.sd7 and sql7.sd7 and added to seed7_05.s7i.
  • The program chkchr.sd7 has been has been improved to check the functions literal() and c_literal().
  • Tests for the function str(), when str() assigned to a variable and when str() is called via a function, have been added to chkint.sd7.
  • Tests for aString[.. pos], aString[pos ..], aString[pos1 .. pos2], aString[pos len length], when they are called via a function, have been added to chkstr.sd7.
  • The example program chkdb.sd7 has been improved to test decimal and numeric fields with negative values.
  • In x509cert.s7i the constant stdCertificate has been improved to have a new validity (until end of 2021).
  • The program chkccomp.c has been improved to determine, if preprocessor directives are allowed in the argument list of a macro invocation (DIRECTIVES_IN_MACRO_ARGUMENTS_OK).
  • In fil_rtl.c the functions filBigLng() and filLng() have been improved to determine the file length always with os_fseek and os_ftell. This guarantees that the correct length is returned, when data is written to a file and it has not been flushed.
  • The function ftelli64Ext() has been added to fil_win.c. This function is used when fseeki64() is available and ftelli64() is missing. Either fgetpos() or _telli64() is used to implement ftelli64Ext().
  • Calls of logFunction have been added in ref_data.c and typ_data.c.
  • In sql_my.c the function sqlBindDuration() has been improved.
  • In sql_odbc.c the function getNumericAsCStri() has been added.
  • In sql_odbc.c the function getNumericFloat() has been improved to convert a SQL_NUMERIC_STRUCT to a double via the decimal representation.
  • In sql_post.c the functions getNumericAsCStri(), getNumericAsStri() and getNumericAsFloat have been improved.
  • The program chkccomp.c has been improved to define the macros 'os_isatty' and 'os_fileno', when the functions isatty() and fileno() are not available.
  • A definition of 'isatty' and 'fileno' has been added to os_decls.h.
  • The mechanism to check for stack overflow has been improved. By default the mechanism is deactivated.

20190126:

  • The program db7.sd7 (Database Inspector 7) has been improved to provide a list of tables and a possibility to view table contents from this list.
  • The program tar7.sd7 and the library tar.s7i have been improved to support Unicode file names.
  • The function setupParameters() in sql_fire.c, sql_lite.c, sql_my.c, sql_oci.c, sql_odbc.c and sql_post.c has been improved to avoid calling malloc(0). Depending on the run-time library malloc(0) may return NULL, which would wrongly trigger a MEMORY_ERROR. The improvement recognizes this situation and avoids calling malloc(0). Other places in the database drivers, where malloc(0) could be called have been fixed also.
  • The database driver sql_fire.c has been improved:
    • Now the cursor of a prepared statement is closed (with isc_dsql_free_statement), when a parameter is bound to it.
    • The opening of a database now appends the extensions .fdb and .gdb, when trying to open the database.
  • The database driver sql_my.c has been improved:
    • The function processEscapesInStatement has been renamed to processStatementStri. Now it removes comments from the statement string.
    • The local variable 'param' has been introduced in the parameter binding functions. This improves readability by avoiding many accesses to the param_array.
    • The local variable 'columnData' has been introduced in the column accessing functions. This improves readability by avoiding many accesses to the result_array.
    • The function sqlColumnFloat has been improved to accept integer fields with all sizes.
  • The database driver sql_oci.c has been improved:
    • Now there is a check if all parameters of a prepared statement are bound. This check takes place when a prepared statement is executed.
    • The function processBindVarsInStatement has been renamed to processStatementStri. Now it removes comments from the statement string and determines the number of bind parameters.
    • The functions setupParameters and allParametersBound have been added and the function resizeBindArray has been removed.
    • The function getFloat has been improved to convert a SQLT NUMBER to a double via the decimal representation.
    • The bind functions have been improved to check, that a parameter with the given index exists.
    • The bind functions have been improved to allow that the same parameter can be bound again with a different bind function (e.g. as integer instead of a bigInteger).
    • The function sqlBindStri has been improved to preserve trailing blanks in a string.
    • The local variable 'param' has been introduced in the parameter binding functions. This improves readability by avoiding many accesses to the param_array.
    • The local variable 'columnData' has been introduced in the column accessing functions. This improves readability by avoiding many accesses to the result_array.
  • The database driver sql_odbc.c has been improved:
    • The maximum number of concurrent activities is determined. If the number of concurrent activities is limited the function sqlExecute() fetches all results and stores them in a prefetch buffer. This way several prepared statements can be used in parallel even when the ODBC driver does not support concurrent activities.
    • The structure resultDescrRecord has been introduced. It contains the result properties of a prepared statement column. The structure resultDataRecord has been reduced to just contain the actual data buffer and length of a result field.
    • The functions freeFetchData, freeFetch, freePrefetched and processStatementStri have been added. The function processStatementStri removes comments from the statement string. This avoids problems with some ODBC drivers.
    • The functions bindResultColumn, bindResult, copyNonBlobBuffers, moveBlobBuffers, copyFetchData, prefetchOne, prefetchAll and doFetch have been added.
    • Now the cursor of a prepared statement is closed (with SQLFreeStmt), when a parameter is bound to it.
    • The function sqlColumnFloat has been improved to accept integer fields with all sizes.
  • The database driver sql_post.c has been improved:
    • The function processBindVarsInStatement has been renamed to processStatementStri. Now it removes comments from the statement string.
    • The local variable 'param' has been introduced in the parameter binding functions. This improves readability by avoiding many accesses to the param_array.
    • The function sqlColumnFloat has been improved to accept integer fields with all sizes.
  • The example program chkdb.sd7 has been improved. Now it tests several corner cases with empty databases, empty statements, comments and literals. The tests with integer fields retrieve the fields now also as floats.
  • Interpreter and compiler have been improved to support the new actions SQL_DRIVER, STR_FOR_KEY and STR_FOR_VAR_KEY.
  • The library forloop.s7i has been improved to use the new actions STR_FOR_KEY and STR_FOR_VAR_KEY.
  • Checks for string for loops have been added to chkstr.sd7.
  • The library sql_base.s7i has been improved to support the new functions driver() and getTableNames(). The function getTableNames returns a list of user table names.
  • The function sqlDriver has been added to sql_rtl.c.

Details

Provenance
gahrAuthored on
Parents
rP495451: security/py-scp: Update to 0.13.1
Branches
Unknown
Tags
Unknown