critcl::util(3tcl)

πŸ“¦
version 3.3.1 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

πŸ‘‘ 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 #define directive for the named define. If value is not specified, it defaults to 1. The result of the command is an empty string πŸ«₯ And note: the configuration file is maintained in the critcl::cache directory πŸ“
  • ::critcl::util::undef path define β€” extends the configuration file at path with an #undef directive for the named define. The result of the command is an empty string too πŸ«₯ Same note, same energy: the configuration file is maintained in the critcl::cache directory πŸ“
  • ::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 (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