critcl::util(3tcl)
π critcl::util β CriTcl Utilities, bestie edition π
okay so welcome to the manual page for critcl::util(3tcl), living in the C Runtime In Tcl family (aka CriTcl). This is the reference page, the whole thing, no skips πΈ
β¨ NAME β¨
critcl::util β CriTcl β Utilities π§°
β¨ SYNOPSIS β¨
package require Tcl 8.6
package require critcl ?3.2?
package require critcl::util ?1.2?
::critcl::util::checkfun name ?label?
::critcl::util::def path define ?value?
::critcl::util::undef path define
::critcl::util::locate label paths ?cmd?
β¨ DESCRIPTION β¨
Hiii, welcome to the C Runtime In Tcl (short: CriTcl), a whole system for embedding and using C code from inside your Tcl scripts (http://core.tcl-lang.org/tcl). Yes, C. In Tcl. It's giving powerful π«Ά
This doc right here is the reference manpage for the critcl::util package. This package is handing you convenience commands for advanced functionality built on top of the core. Who's it for? Mainly developers who wanna write Tcl packages with embedded C code. That's the audience, periodt β¨
This package resides in the Core Package Layer of CriTcl. Here's the vibe map π
+----------------+
|Applications |
| critcl |
| critcl::app |
+----------------+
*================*
|Core Packages |
| critcl |
| critcl::util |
*================*
+----------------+
|Support Packages|
| stubs::* |
| md5, platform |
| ... |
+----------------+
β¨ API β¨
::critcl::util::checkfun name ?label?β this one checks the build-time environment for whether the C function name literally exists. Returns true on success, and false otherwise. no cap π::critcl::util::def path define ?value?β extends the configuration file at path with a#definedirective for the named define. If value is not specified, it defaults to1. The result of the command is an empty string π«₯ And note: the configuration file is maintained in thecritcl::cachedirectory π::critcl::util::undef path defineβ extends the configuration file at path with an#undefdirective for the named define. The result of the command is an empty string too π«₯ Same note, same energy: the configuration file is maintained in thecritcl::cachedirectory π::critcl::util::locate label paths ?cmd?β checks the build-time environment for a file existing in a set of possible paths π
If the option cmd prefix is specified, it will be called with the full path of a found file as its only argument, so it can do further checks. A return value of false will reject the path and continue the search π«
The return value of the command is the found path, as listed in paths. As a side effect, the command will also print the found path, prefixed with the label, using critcl::msg π£
Failure to find the path is reported via critcl::error, and a possible empty string as the result, if critcl::error does not terminate execution π A relative path is resolved relative to the directory containing the CriTcl script.
β¨ AUTHORS β¨
Andreas Kupries π
β¨ BUGS, IDEAS, FEEDBACK β¨
This document, and the package it describes, will undoubtedly contain bugs and other problems. Not me being honest, but fr fr π Please report such at https://github.com/andreas-kupries/critcl. Please also report any ideas for enhancements you may have for either the package and/or the documentation. We want the feedback, we want the glow-up π«Ά
β¨ KEYWORDS β¨
C code, Embedded C Code, code generator, compile & run, compiler, dynamic code generation, dynamic compilation, generate package, linker, on demand compilation, on-the-fly compilation βοΈπ₯
β¨ CATEGORY β¨
Glueing/Embedded C code π§©
β¨ COPYRIGHT β¨
Copyright (c) 2011-2024 Andreas Kupries π
and that's the whole page, bestie, you ate it π
okay bye, this was rendered from doc, version 1.2, and it's critcl::util(3tcl) β slay, see you in the next manpage πβ¨π
π¦ where this page comes from
- ubuntu resolute: critcl 3.3.1+dfsg-1build1 Β· BSD
- ubuntu stonking: critcl 3.3.1+dfsg-1.1 Β· BSD
- Copyright (c) 2011-2024 Andreas Kupries
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms