nsfError.c

Clone Tools
  • last updated 17 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Improve documentation on NsfDStringVPrintf()

Another attempt to sort out the vs*printf() mess between runtimes

- fix potential memory corruption bug in NsfDStringVPrintf()

  1. … 1 more file in changeset.
- New macros NSF_nonnull_assert() and nonnull_assert() Background: The unreleased gcc6 with "-pedantic" complaints since recently about asserts, in which nonnull conditions implied by nonnull declarations are explicitly tested, and spits out warnings like ... warning: nonnull argument ... compared to NULL ... The new macros turns off asserts, when gcc6 is used.

  1. … 16 more files in changeset.
- prefer boolean expressions - reduce implicit conversions - wite body of if-statements as blocks - whitespace changes - update licenses

  1. … 8 more files in changeset.
- changed trace facility to append to a variable to minimize interactions for results and return codes, which happen via nsf::log. - added more convenient function for adding to DStrings: Nsf_DStringPrintf - renamed NsfDStringPrintf to NsfDStringVPrintf - replaced complex macros for tracing by functions

  1. … 8 more files in changeset.
- prefer const over CONST unless Tcl API

  1. … 6 more files in changeset.
- prefer boolean expression in tests over expressions of other types

  1. … 26 more files in changeset.
NsfDStringPrintf(): Fix vargs processing under VC 12

Done revising license statements in generic/*

  1. … 26 more files in changeset.
- white-space changes

  1. … 15 more files in changeset.
- fix name paths in error messages triggered from ArgumentParse()

  1. … 5 more files in changeset.
- move NsfMethodNamePath() out of NsfUnexpectedArgumentError() and NsfUnexpectedNonposArgumentError()

  1. … 1 more file in changeset.
- no need to call NsfMethodNamePath in NsfArgumentError()

- move NsfMethodNamePath() out of NsfUnexpectedArgumentError() and NsfUnexpectedNonposArgumentError()

  1. … 1 more file in changeset.
- move NsfMethodNamePath() out of NsfObjWrongArgs()

  1. … 2 more files in changeset.
Saving away the ad hoc changes to fix method-path generation

  1. … 6 more files in changeset.
nsf.c: - added options to filter output from ::nsf::cmd::info parameter options (args, syntax, parameter) - deleted: - "/obj/ info lookup configure parameters ?pattern?" - "/obj/ info lookup configure syntax" - added: - "/obj/ info lookup parameters /methodName/ ?pattern?" - "/obj/ info lookup syntax /methodName/ ?pattern?" This covers as well - "/obj/ info lookup parameters configure|create|new|... ?pattern?" - extend regression test

  1. … 9 more files in changeset.
nsf.c, gentclAPI.tcl: - new argument types "virtualobjectargs" and "virtualclassargs" for context-specific argument resolutions: when a context object is provided, arguments of type "virtualobjectargs" are determined based on the slots applicable for the object (like "... lookup ..."), arguments of type "virtualclassargs" are resolved against a class. These types are used as follows: /obj/ configure /virtualobjectargs/ /cls/ create /name/ /virtualclassargs/ /cls/ recreate /name/ /virtualclassargs/ /cls/ new ?-childof /obj/? /virtualclassargs/ This new feature allows us to provide better error messages and to make much of the "... info ... configure parameter ..." infrastructure much less important. - For "virtualclassargs" we need the functionality to obtain from the C-Code based on a class the configure parameters applicable to objects of this class. - add argument "-context ..." to "cmd::info" to pass the context object (so far the only place where the context-object is used) - object system configuration parameters changes: new: -class.configureparameter new: -object.configureparameter removed: -class.objectparameter

  1. … 16 more files in changeset.
- add asserts to nsfError.c

  1. … 2 more files in changeset.
- update more copyright notices

  1. … 31 more files in changeset.
- fix case, where NsfDStringPrintf() failed (when print llength including \0 was 1 byte longer than print buffer)

- At two or three locations, we used to compute the method path using different helpers (CallStackMethodPath, NsfMethodNamePath) etc. I tried to unify this by revising NsfMethodNamePath to accomodate the different uses.

- Besides, for required-argument checks, I included the method path

(for ensemble invocations) into the error messages.

  1. … 2 more files in changeset.
- strip trailing spaces

  1. … 4 more files in changeset.
- NsfDStringPrintf(): set the length of the resulting DString

Using the ANSI-compliant I/O operations such as vsnprintf() under MinGW and MinGW-w64 tool chains

  1. … 1 more file in changeset.
- further release work

  1. … 35 more files in changeset.
MinGW toolchains do not provide support _vscprintf(), so we limit the use of it to MSVC; tested NsfDStringPrintf under MinGW

Fixed the Win32 logic for computing the Tcl_DStringth in NsfDStringPrintf(), tested for MSVC under x86 and amd64

- try to print arguments in one sweep in NsfDStringPrintf() - remove "extern" declarations

  1. … 1 more file in changeset.