File: critcl_util.man

package info (click to toggle)
critcl 3.1.17%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 10,028 kB
  • sloc: ansic: 54,884; tcl: 15,930; sh: 6,951; pascal: 3,272; asm: 3,058; ada: 1,681; cpp: 1,001; cs: 879; makefile: 310; perl: 104; xml: 95; f90: 10
file content (88 lines) | stat: -rw-r--r-- 3,121 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin critcl::util 3tcl 1]
[include include/module2.inc]
[titledesc {CriTcl Utilities}]
[require Tcl 8.4]
[require critcl [opt 2.1]]
[require critcl::util [opt 1]]
[description]
[para]
[include include/welcome.inc]
[para]

This document is the reference manpage for the [package critcl::util]
package. This package provides convenience commands for advanced
functionality built on top of the core.

Its intended audience are mainly developers wishing to write Tcl
packages with embedded C code.
[para]

This package resides in the Core Package Layer of CriTcl.
[para][image arch_core][para]

[comment {===================================================================}]
[section API]

[list_begin definitions]
[comment {* * ** *** ***** ******** ************* *********************}]
[call [cmd ::critcl::util::checkfun] [arg name] [opt [arg label]]]

This command checks the build-time environment for the existence of
the C function [arg name].

It returns [const true] on success, and [const false] otherwise.


[comment {* * ** *** ***** ******** ************* *********************}]
[call [cmd ::critcl::util::def] [arg path] [arg define] [opt [arg value]]]

This command extends the specified configuration file [arg path] with a
[const \#define] directive for the named [arg define]. If the [arg value]
is not specified it will default to [const 1].

[para] The result of the command is an empty string.

[para] Note that the configuration file is maintained in the [cmd critcl::cache]
directory.


[comment {* * ** *** ***** ******** ************* *********************}]
[call [cmd ::critcl::util::undef] [arg path] [arg define]]

This command extends the specified configuration file [arg path] with an
[const \#undef] directive for the named [arg define].

[para] The result of the command is an empty string.

[para] Note that the configuration file is maintained in the [cmd critcl::cache]
directory.


[comment {* * ** *** ***** ******** ************* *********************}]
[call [cmd ::critcl::util::locate] [arg label] [arg paths] [opt [arg cmd]]]

This command checks the build-time environment for the existence of a file
in a set of possible [arg paths].

[para] If the option [arg cmd] prefix is specified it will be called with
the full path of a found file as its only argument to perform further checks.
A return value of [const false] will reject the path and continue the search.

[para] The return value of the command is the found path, as listed in
[arg paths]. As a side effect the command will also print the found path,
prefixed with the [arg label], using [cmd critcl::msg].

[para] Failure to find the path is reported via [cmd critcl::error], and a
possible empty string as the result, if [cmd critcl::error] does not
terminate execution.

[para] Relative paths are allowed as elements of [arg paths], and are
normalized relative to the directory containing the currently handled
critcl file.

[list_end]

[comment {===================================================================}]
[include include/feedback2.inc]
[manpage_end]