- Publicity: Public Only All
tcllib-doc-procs.tcl
API-browser documentation for external Tcl commands used by OpenACS. Only already-provided packages and existing commands are documented. Documentation-only ad_proc declarations do not replace implementations. Declarations stay in this source file, not in interpreter-blueprint data.
- Location:
- packages/acs-tcl/tcl/tcllib-doc-procs.tcl
Procedures in this file
- acs::tcllib::document (private)
- acs::tcllib::register_documentation (private)
- auto_execok (public)
- base64::ADD (private)
- base64::decode (public)
- base64::encode (public)
- dom (public)
- md5::Hex (private)
- md5::MD5Final (public)
- md5::MD5Hash (private)
- md5::MD5Init (public)
- md5::MD5Update (public)
- md5::Pop (private)
- md5::bytes (private)
- md5::md5 (public)
- mime::addr_domain (private)
- mime::addr_end (private)
- mime::addr_group (private)
- mime::addr_local (private)
- mime::addr_next (private)
- mime::addr_phrase (private)
- mime::addr_route (private)
- mime::addr_routeaddr (private)
- mime::addr_specification (private)
- mime::addr_x400 (private)
- mime::base64 (private)
- mime::buildmessage (public)
- mime::buildmessageaux (private)
- mime::finalize (public)
- mime::getbody (public)
- mime::getheader (public)
- mime::getproperty (public)
- mime::getsize (private)
- mime::initialize (public)
- mime::initializeaux (private)
- mime::md5 (private)
- mime::parseaddress (public)
- mime::parseaddressaux (private)
- mime::parsedatetime (public)
- mime::parselexeme (private)
- mime::parsepart (private)
- mime::parsetype (private)
- mime::parsetypeaux (private)
- mime::qp_encode (private)
- mime::quoted-printable (private)
- mime::reversemapencoding (public)
- mime::setheader (public)
- mime::uniqueID (public)
- mime::word_encode (private)
- nstrace::namespaces (private)
- nstrace::statescript (private)
- tcl::mathfunc::double (public)
- tcl::mathfunc::max (public)
- tdom::IANAEncoding2TclEncoding (public)
- tdom::xmlOpenFileWorker (private)
- tdom::xmlReadFile (private)
- transform (private)
- uri::join (public)
- uri::split (public)
Detailed information
acs::tcllib::document (private)
acs::tcllib::document package proc_name arguments documentation \
[ protection ]Register documentation for an existing command of an already-loaded Tcl package, without replacing its implementation or existing docs.
- Parameters:
- package (required)
- Owning Tcl package, or empty for a NaviServer core command.
- proc_name (required)
- Fully qualified command name.
- arguments (required)
- Documented Tcl argument list.
- documentation (required)
- API-browser documentation text.
- protection (optional, defaults to
"public")- API-browser visibility, public or private.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
acs::tcllib::register_documentation (private)
acs::tcllib::register_documentation [ proc_name ]
Refresh documentation for existing Tcl core and extension commands, optionally when metadata is requested for a single command. This procedure never requires a package or evaluates its loader.
- Parameters:
- proc_name (optional)
- Procedure name, or empty to refresh all declarations.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
auto_execok (public)
auto_execok name
Find a command that Tcl can invoke with exec.
- Parameters:
- name (required)
- Command name or path.
- Returns:
- A command prefix suitable for exec, or an empty string if unavailable.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
base64::ADD (private)
base64::ADD x
Append a character to the pure-Tcl Base64 encoder's caller-owned output state, inserting line breaks as needed. This version-dependent helper requires its encoder's local variables and is not a standalone API.
- Parameters:
- x (required)
- Character to append.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
base64::decode (public)
base64::decode string
Decode standard Base64 text using Tcllib. Acceptance of malformed input depends on the loaded package version and implementation.
- Parameters:
- string (required)
- Base64-encoded input.
- Returns:
- Decoded binary data.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
base64::encode (public)
base64::encode [ args... ]
Encode binary data as standard Base64 using Tcllib.
- Returns:
- Base64-encoded text.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
dom (public)
dom subcommand [ args... ]
Parse XML or create and manage DOM documents using tDOM.
- Parameters:
- subcommand (required)
- Operation such as parse or createDocument.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
md5::Hex (private)
md5::Hex data
Convert binary data to hexadecimal for Tcllib's MD5 implementation.
- Parameters:
- data (required)
- Bytes to encode.
- Returns:
- Hexadecimal text.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
md5::MD5Final (public)
md5::MD5Final token
Finalize an incremental MD5 digest and release its state.
- Parameters:
- token (required)
- Token returned by MD5Init.
- Returns:
- The binary MD5 digest.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
md5::MD5Hash (private)
md5::MD5Hash token msg
Update the pure Tcl MD5 digest state with one 64-byte block.
- Parameters:
- token (required)
- Internal MD5 digest state token.
- msg (required)
- Message block to process.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
md5::MD5Init (public)
md5::MD5Init
Initialize a Tcllib incremental MD5 digest.
- Returns:
- A token for MD5Update and MD5Final.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
md5::MD5Update (public)
md5::MD5Update token data
Feed a chunk of binary data into an incremental MD5 digest.
- Parameters:
- token (required)
- Token returned by MD5Init.
- data (required)
- Chunk to hash.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
md5::Pop (private)
md5::Pop varname [ nth ]
Remove and return an element from a list in the caller's scope.
- Parameters:
- varname (required)
- Name of the caller's list variable.
- nth (optional, defaults to
"0")- Index of the element to remove, defaulting to the first.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
md5::bytes (private)
md5::bytes v
Encode an MD5 state word as four bytes in little-endian order.
- Parameters:
- v (required)
- Integer word to encode.
- Returns:
- The four bytes of the word.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
md5::md5 (public)
md5::md5 [ args... ]
Compute an MD5 digest using the already-loaded Tcllib MD5 implementation. The default result is binary in MD5 2.x; -hex requests hexadecimal output.
- Returns:
- MD5 digest in the requested representation.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::addr_domain (private)
mime::addr_domain token
Parse a domain using internal MIME address-parser state.
- Parameters:
- token (required)
- Internal address-parser token.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::addr_end (private)
mime::addr_end token
Validate the end of an address using internal MIME parser state. Invalid trailing syntax raises an error.
- Parameters:
- token (required)
- Internal address-parser token.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::addr_group (private)
mime::addr_group token
Parse an address group using internal MIME parser state.
- Parameters:
- token (required)
- Internal address-parser token.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::addr_local (private)
mime::addr_local token
Parse the local part of a mailbox and store it in the MIME parser state.
- Parameters:
- token (required)
- Internal address-parser token.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::addr_next (private)
mime::addr_next token
Advance an internal MIME address-parser token to the next address. This version-dependent helper updates parser state and is not a public API.
- Parameters:
- token (required)
- Internal address-parser token.
- Returns:
- 1 if another address was parsed, or 0 at the end of the list.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::addr_phrase (private)
mime::addr_phrase token
Parse an address phrase using internal MIME parser state.
- Parameters:
- token (required)
- Internal address-parser token.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::addr_route (private)
mime::addr_route token
Parse a source route and store it in the MIME parser state.
- Parameters:
- token (required)
- Internal address-parser token.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::addr_routeaddr (private)
mime::addr_routeaddr token [ checkP ]
Parse a route address using internal MIME parser state.
- Parameters:
- token (required)
- Internal address-parser token.
- checkP (optional, defaults to
"1")- Whether to require a closing angle bracket.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::addr_specification (private)
mime::addr_specification token
Parse the next address specification using the internal MIME parser state and lookahead. Invalid address syntax can raise an error. This version-dependent helper is not a public API.
- Parameters:
- token (required)
- Internal address-parser token.
- Returns:
- 1 if another address was parsed, or 0 at the end of the list.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::addr_x400 (private)
mime::addr_x400 mbox key
Extract a keyed attribute from an X.400 mailbox representation for the internal MIME address parser. This helper is not a public API.
- Parameters:
- mbox (required)
- X.400 mailbox representation.
- key (required)
- Attribute key to find, matched without case distinctions.
- Returns:
- Attribute value with surrounding quotes trimmed, or an empty string if the key is absent.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::base64 (private)
mime::base64 modeOption action separator chunk
Internal MIME adapter for Base64 encoding and decoding when Trf is absent. This helper is version-dependent and is not a standalone public API.
- Parameters:
- modeOption (required)
- Literal -mode argument.
- action (required)
- encode or decode.
- separator (required)
- Literal -- argument.
- chunk (required)
- Data to process.
- Returns:
- The encoded or decoded chunk.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::buildmessage (public)
mime::buildmessage token
Serialize a Tcllib MIME token, including its headers and body. This command is documented by Tcllib even though some versions do not export it from the mime namespace.
- Parameters:
- token (required)
- MIME token to serialize.
- Returns:
- The complete MIME message.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::buildmessageaux (private)
mime::buildmessageaux token
Internal recursive MIME message serializer used by mime::buildmessage. This helper is version-dependent and operates on MIME token state.
- Parameters:
- token (required)
- MIME token to serialize.
- Returns:
- Serialized MIME message content.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::finalize (public)
mime::finalize token [ args... ]
Release a Tcllib MIME token and its associated resources.
- Parameters:
- token (required)
- MIME token to release.
- Returns:
- The empty string.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::getbody (public)
mime::getbody token [ args... ]
Read the body of a Tcllib MIME token. The -decode option requests transfer decoding; -command enables callback-based delivery.
- Parameters:
- token (required)
- MIME token to read.
- Returns:
- The body, or the final callback result when -command is used.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::getheader (public)
mime::getheader token [ key ]
Read headers of a Tcllib MIME token. Repeated headers can have multiple values.
- Parameters:
- token (required)
- MIME token to inspect.
- key (optional)
- Header name, -names for header names, or empty for all headers.
- Returns:
- Matching header values, header names, or header name/value pairs.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::getproperty (public)
mime::getproperty token [ property ]
Read properties of a Tcllib MIME token, such as content, encoding, params, parts and size.
- Parameters:
- token (required)
- MIME token to inspect.
- property (optional)
- Property name, -names for property names, or empty for all properties.
- Returns:
- The property value, property names, or property name/value pairs.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::getsize (private)
mime::getsize token
Determine the size reported for a MIME token by mime::getproperty. This internal helper is version-dependent and is not a public API.
- Parameters:
- token (required)
- MIME token to inspect.
- Returns:
- The size reported for the MIME part.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::initialize (public)
mime::initialize [ args... ]
Create a Tcllib MIME token by parsing a message or constructing a part.
- Returns:
- A MIME token; release it with mime::finalize when finished.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::initializeaux (private)
mime::initializeaux token [ args... ]
Configure an allocated MIME token's internal state on behalf of mime::initialize. This helper is version-dependent, not a public API.
- Parameters:
- token (required)
- Allocated MIME token to configure.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::md5 (private)
mime::md5 separator string
Internal MIME adapter for computing a hexadecimal MD5 digest when Trf is absent. The ignored first positional parameter has a version-dependent name in Tcllib. This helper is not a public API.
- Parameters:
- separator (required)
- Literal -- argument, ignored by the adapter.
- string (required)
- Data to hash.
- Returns:
- Hexadecimal MD5 digest.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::parseaddress (public)
mime::parseaddress string
Parse an email address list using Tcllib's MIME address parser.
- Parameters:
- string (required)
- Address list to parse.
- Returns:
- A list of address records represented as name/value lists.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::parseaddressaux (private)
mime::parseaddressaux token string
Parse an address list using an internal MIME address-parser token. This helper is version-dependent and is not a public API.
- Parameters:
- token (required)
- Internal address-parser token.
- string (required)
- Address list to parse.
- Returns:
- Parsed address records as name/value lists.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::parsedatetime (public)
mime::parsedatetime value property
Extract a property from an email date-time value using Tcllib.
- Parameters:
- value (required)
- Email date-time string, or -now for the current time.
- property (required)
- Requested property, such as clock, proper, year, mon or zone.
- Returns:
- The requested date-time property.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::parselexeme (private)
mime::parselexeme token
Consume the next lexeme from an internal MIME address-parser token, updating its input, buffer and last-lexeme state. This version-dependent helper is not a public API.
- Parameters:
- token (required)
- Internal address-parser token.
- Returns:
- Lexeme type recognized by the parser.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::parsepart (private)
mime::parsepart token
Parse a MIME part from its token's string or file input and populate the internal part state. Parsing errors are reported as Tcl errors. This version-dependent helper is not a public API.
- Parameters:
- token (required)
- MIME token containing the part to parse.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::parsetype (private)
mime::parsetype token string
Parse a Content-Type value for an internal MIME token.
- Parameters:
- token (required)
- MIME parser token.
- string (required)
- Content-Type value to parse.
- Returns:
- Content type and parameters as a two-element list.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::parsetypeaux (private)
mime::parsetypeaux token string
Parse the media type, subtype and parameters for the MIME Content-Type parser.
- Parameters:
- token (required)
- Internal MIME parser token.
- string (required)
- Original Content-Type value.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::qp_encode (private)
mime::qp_encode string [ encoded_word ] [ no_softbreak ]
Encode quoted-printable content using a Tcllib MIME implementation helper. This non-exported helper is version-dependent.
- Parameters:
- string (required)
- Data to encode.
- encoded_word (optional, defaults to
"0")- Use encoded-word processing when true.
- no_softbreak (optional, defaults to
"0")- Suppress insertion of soft line breaks when true.
- Returns:
- Quoted-printable text.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::quoted-printable (private)
mime::quoted-printable modeOption action separator chunk
Internal MIME adapter for quoted-printable encoding and decoding when Trf is absent. This helper is version-dependent, not a public API.
- Parameters:
- modeOption (required)
- Literal -mode argument.
- action (required)
- encode or decode.
- separator (required)
- Literal -- argument.
- chunk (required)
- Data to process.
- Returns:
- The encoded or decoded chunk.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::reversemapencoding (public)
mime::reversemapencoding mimeType
Map a MIME charset name to the corresponding Tcl encoding name using Tcllib's case-insensitive mapping table.
- Parameters:
- mimeType (required)
- MIME charset name.
- Returns:
- The Tcl encoding name, or the empty string if no mapping is known.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::setheader (public)
mime::setheader token key value [ args... ]
Change a header of a Tcllib MIME token, subject to its restrictions on MIME-managed headers.
- Parameters:
- token (required)
- MIME token to modify.
- key (required)
- Header name.
- value (required)
- Header value.
- Returns:
- Previous values associated with the header.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
mime::uniqueID (public)
mime::uniqueID
Generate a MIME Content-ID using Tcllib's process ID, clock, hostname and counter. This is not a cryptographic random identifier.
- Returns:
- An identifier enclosed in angle brackets.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- acs_mail_lite_inbound_procs_check
mime::word_encode (private)
mime::word_encode charset method string [ args... ]
Encode an RFC 2047 header value using a Tcllib MIME implementation helper. This non-exported helper is version-dependent.
- Parameters:
- charset (required)
- MIME charset name.
- method (required)
- base64 or quoted-printable.
- string (required)
- Data to encode.
- Returns:
- Encoded header text.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
nstrace::namespaces (private)
nstrace::namespaces [ top ]
Enumerate namespaces for NaviServer interpreter blueprint serialization.
- Parameters:
- top (optional, defaults to
"::")- Root namespace to scan, including the root itself.
- Returns:
- Namespace names, omitting configured excluded descendants.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
nstrace::statescript (private)
nstrace::statescript [ file ]
Generate the NaviServer interpreter blueprint used to initialize other Tcl interpreters from the current interpreter state.
- Parameters:
- file (optional)
- Optional path to write the generated script to.
- Returns:
- The generated Tcl script when no file is specified.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
tcl::mathfunc::double (public)
tcl::mathfunc::double arg
Convert a numeric value to a double-precision floating-point value. This command implements double() for Tcl expressions.
- Parameters:
- arg (required)
- Numeric value to convert.
- Returns:
- The converted floating-point value.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
tcl::mathfunc::max (public)
tcl::mathfunc::max arg [ args... ]
Return the greatest of one or more numeric arguments. This command implements max() for Tcl expressions.
- Parameters:
- arg (required)
- First numeric argument.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
tdom::IANAEncoding2TclEncoding (public)
tdom::IANAEncoding2TclEncoding IANAName
Map a recognized IANA character encoding name to Tcl's encoding name. Matching is case-insensitive. An unrecognized name raises an error.
- Parameters:
- IANAName (required)
- Character encoding name or alias.
- Returns:
- The corresponding Tcl encoding name.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
tdom::xmlOpenFileWorker (private)
tdom::xmlOpenFileWorker filename [ encodingString ] [ forSimple ] \
[ forRead ]Open an XML file and configure the channel for tDOM's parser or file reader.
- Parameters:
- filename (required)
- XML file to open.
- encodingString (optional)
- Optional caller variable for encoding information.
- forSimple (optional, defaults to
"0")- Select the simple parser's channel handling.
- forRead (optional, defaults to
"0")- Select channel handling for reading the file as text.
- Returns:
- Open input channel.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
tdom::xmlReadFile (private)
tdom::xmlReadFile filename [ encodingString ]
Read XML file content through tDOM's internal encoding-aware file helper. This implementation helper is not a public API.
- Parameters:
- filename (required)
- XML file to read.
- encodingString (optional)
- Optional name of a caller variable receiving encoding information.
- Returns:
- File content read by the helper.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
transform (private)
transform [ args... ]
Internal compatibility shim installed by Tcllib SMTP when Trf is unavailable. Set the caller's SMTP size state to 1.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
uri::join (public)
uri::join [ args... ]
Construct a URI from Tcllib component name/value pairs. Accepted components and normalization depend on the selected scheme.
- Returns:
- The constructed URI.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
uri::split (public)
uri::split url [ defaultscheme ]
Split a URI into scheme-dependent component name/value pairs using Tcllib. The result is suitable for array set or dict operations. Parsing follows the package's configured URI quirk options.
- Parameters:
- url (required)
- URI to parse.
- defaultscheme (optional, defaults to
"http")- Scheme used when the URI has no scheme; defaults to http.
- Returns:
- Component names and values, including the scheme.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.